Receiving a list of files from a folder in text form. Elena Iskhakova's blog Duplex printing of a list of files from Explorer

Sometimes when working on a computer, you need to get a list of all the files in a specific folder. If there are few files in the folder, this can be easily done manually. What if this is, for example, an electronic library or a photo archive for several years? Below we'll look at several ways to get an ordered list of all the files in a specific folder.

The first method discussed today is using the command line. To do this, do the following:

Total Commander

The next way to estimate the number of files in a folder is the popular Total Commander file manager. To use it, do the following:

  1. Download the program from the link
  2. Run the downloaded file. Select the installation language, then click “Next”
  3. Answer the question whether you need other languages
  4. Specify the installation directory
  5. Specify whether you want to create shortcuts
  6. After installation is complete, launch the program. The free version requires you to click one of three buttons at the bottom of the window each time you start it
  7. In any of the two panels of the file manager, go to the folder in which you want to count the files
  8. In the “Selection” menu you need to click on the “Select All” command
  9. Selected files and folders will be indicated in red. From the Selection menu, select Copy File Names to Clipboard
  10. You can then open Notepad and paste the file names into a text editor

DirLister

The last way to get the names of all the files in a folder, which we will look at today, is a small utility called DirLister. To do this you will need to go the following way.

Content:

Many computer owners would like to have printed lists of their folder structures and the files contained in those folders; this way, users can refer to them when needed. While the Mac operating system has a utility that allows you to print a list of files, Windows does not. However, there are a number of workarounds for this issue. Here are a few different ways to print a list of files stored on your computer.

Steps

1 Using Windows

  1. 1 Navigate to the folder on your computer that contains the files you would like to see in the list you print.
    • This could be your My Documents folder or any other subfolder within it.
  2. 2 Select the “List” option in the “View” option and do not enlarge the active window until all files are displayed.
    • You can repeat the steps described above if you are unable to make the window large enough to fit all the files on the screen.
  3. 3 Press the key.
    • The text on this key is sometimes shortened depending on the keyboard model you are using. This could be some other abbreviated description.
  4. 4 Launch the Paint application, located in the Accessories section of the Program list in the Start menu.
  5. 5 Click on the “Edit” option on the toolbar and select “Paste”.
  6. 6 Crop the screen image using the Crop utility under the Image section in the toolbar.
  7. 7 Print the image using the keyboard shortcut, the Printer Quick Launch button, or by selecting Print from the File menu. This procedure will produce a printed list of files.

2 Using DOS

  1. 1 Open a command prompt to prepare for printing in DOS.
    • In Windows Vista or Windows 7, type “Command Prompt” or “Cmd” into the Start menu search box and press [Enter].
    • In Windows XP, you will find the Command Prompt application in the Accessories section of the Program list listed in the Start menu.
  2. 2 Type “dir /a” at the command line, followed by the full path to the desired folder, the list of files from which you want to print in DOS.
    • For example, if you want a complete list of files in your Documents folder, you would type "dir /a" followed by "C:UsersYourUserNameDocuments", keeping the quotes for only that part of the command.
  3. 3 Provide a file name and location to print a directory of your files.
    • For example, to save a file to your desktop in Windows Vista, you would type ">C:usersyourusernamedesktopdirlist.txt" at the command prompt without the quotes.
  4. 4 Press [Enter] after completing the command line.
    • You have just created a .txt file called "dirlist" that is located on your desktop. Double-clicking on this file will open it in Word, Notepad, or some other text editing program, where it can be formatted and printed.

3 Using Mac

  1. 1 Navigate to the folder in Finder that contains the files you'd like to list.
  2. 2 Press and hold the key when selecting an individual file, or the key combination to select all currently displayed files, to print the Finder.
  3. 3 Launch the TextEdit app and then press the keyboard shortcut to paste the list into a blank document.
  4. 4 Edit the document as you wish and print the Finder. You should make sure that you are using a blank text document and not a file containing text, which you can switch between through the Format menu or by pressing the keyboard shortcut.
  • If you have problems inserting an image of your screenshot into the Paint application when working on Windows, you can try inserting the image into Word or any other word processing program.

Hello everyone, my dears! Just yesterday I realized this thing: many of my readers are very poorly versed in computers. That is, I’m talking here about how to make money using the Internet, about some cool services for saving money while traveling, but it’s all like a wallop, because computers are a dark forest for some of my guests.

So today I decided to correct this omission and start with a very detailed story about how to type text on a computer. So...

In this article:

1. Program for working with text

There are special programs for creating a text electronic document. They allow you to print text, that is, create a layout of a document in electronic form, which can then be printed on a computer or transferred to a flash drive.

There are a huge number of such programs, but there are only a few of the most popular.

1 —Microsoft Office Word
2 —WordPad
3 - Writer (rarely used, needs to be installed separately).

2. How to find the desired program on your computer

I know from my family that the most difficult thing for a beginner at the first stage is to find and open these programs.

To cope with this task, you must understand what program icons look like. Most often this is a document icon with the letter W, or as in the latter case - with the letter A(this is how the WordPad program is designated):

Look closely at the desktop and the toolbar below, programs can be placed in a prominent place, like on my desktop (by the way, here it is, don’t be alarmed):


If you don't find anything like that, then try the second method:

1 - launch the panel Start or just click on the round icon in the lower left corner, a menu will open.

In it you need to find a field to search for files, I call it Find programs and files:


It is in this field that you enter the name of the program you are looking for. For example, I enter the word Word and get Microsoft Office Word programs:


If I enter the word WordPad, it will find this program for me:

After that, you simply click on the found program, and a working window opens in front of you in which you can create a document: print text, edit it and save it.

3. Working with a document and editing text

So, in front of you is a working area, the so-called blank sheet. This is where you can print text and edit it as you please.


Usually, beginners, when they see this sheet and a huge number of buttons, get lost and don’t know what to do. What causes a brain explosion most of all is the keyboard: it is not clear where and what to press.

So, you don’t need to be afraid of this, you will definitely be able to figure it out. To do this, just watch this informative video; everything in it is very simple and explains in detail the main features of the program.

Be sure to watch this informative video from beginning to end, remembering to repeat all the steps after the presenter. This will take a giant step in learning text editors.

Then all you have to do is practice, and then you will be able to navigate literally any text programs, since they are all designed approximately the same.

4. How to save text

Once you have created your document, you can save it. To do this, find the button in the upper left corner that calls up the menu, and from this menu select Save as and any suitable format, for example Word document:


A window will appear in which you can select:

  1. where to save the file (I usually choose Desktop,
  2. what to name the file (enter any suitable name),
  3. and the file format (I don’t change it, I leave it as default).


Ready! This file will now appear on your computer's desktop.


You can do whatever you want with this document. For example, put it on a flash drive, send it by email, open it for further editing, or delete it.

By the way, if you are working on a large document, I recommend that you make intermediate saves. And the more often, the better.

5. How to transfer a text file to a flash drive

Everything is very simple.

1. Insert the flash drive into the computer.

2. On your desktop, find and open My computer(or simply Computer).

3. In the window that opens you should see Removable drive, click on it 2 times:


An empty window will open, which we will leave for now:


4. Now find our text file, we saved it in the previous paragraph on your desktop. Click on it with the RIGHT mouse button, and in the menu that appears, select Copy:

5. Now go back to the removable drive that we just opened in step 3, click on the free field with the RIGHT mouse button and select Insert:


The document will be copied and appear in this field:


That's it, now the flash drive can be removed from the computer.

6. How to print a document on a printer

Let's say you have a printer, it is already connected to your computer and configured properly. I won’t talk about connecting the printer and settings now, as this is a topic for a separate article.

But if you already have everything set up, you can print the document in literally 2 clicks. But first, make sure the printer is turned on and has the required amount of paper.

1. Open the document you want to print:


2 . Find and open the menu in the upper left corner and select from it Seal, and then again Seal:


A window with a bunch of settings will open, but don’t be afraid of them, they are all quite simple.

Here you can select a printer, if you have several of them, the number of copies of the document, sheet format, print color, etc.

But if you don’t need any specific settings, you can leave everything as default and just click OK.


The printer will start printing and you will receive the document. By the way, in this way you can print not only a text document, but also other files, the scheme will be the same.

7. Become “YOU” with your computer and improve your life

Not having a common language with a computer today is a big problem. If 5 years ago it was excusable not to be able to work with technology, today this results in a huge obstacle for every beginner. This is because almost every profession today comes into contact with a computer in one way or another.

When I worked at a large military enterprise, we were installed a new version of the design program. It didn't cause any problems for me, just a new shell.

This can be compared to the updated packaging of my favorite candies: I didn’t stop buying them less, but was simply able to quickly adapt to the new wrapper.

But for many employees this was literally a disaster, they were so dependent on the program interface, and their brains were so desperately resistant to anything new. As a result, they were even trained to work in the new interface.

Today is not the best time for Russian companies, and I don’t even need to guess who will be the first to be laid off...

And a completely opposite example is also from real life.

The engineer has more than 40 years of experience, is constantly developing and mastering not only the computer, but also all modern engineering programs. They don’t want to let such a specialist go; he is needed, in demand and speaks the same language with his young subordinates.

This is just one example. Now think about how many opportunities the ability to use a computer opens up to make money remotely via the Internet. Even after learning how to use a text editor, you can write .

Being familiar with a computer is a necessity today. It doesn’t matter where you study, today there is a huge amount of useful materials, courses, and schools on the Internet.

I will end here. I hope that the article was useful to you and helped you understand the main points. Move forward, improve, be better. That's all for today, thank you for your attention and bye!

For certain purposes, you may need to list the files contained in a folder. If there are few of them, then the task can be completed manually without much difficulty, but if there are dozens, hundreds or even thousands of files in the folder, then trying to list them manually is a waste of time. Is it possible to automate this process somehow?

Automatic creation of a list of files

Fortunately, the functionality of Windows and other software solutions allows you to create lists of files in folders in automatic order. These lists can then be easily copied into a text file and edited as needed.

Let's consider all the available ways to create such a list.

Option 1: "Command Line"

This method is standard and does not require any special skills from the user, except for basic knowledge "Command line". So, the instructions for this option look like this:


All information from it can be copied into a Word document, since the latter is more convenient to edit. In addition, if the folder contained files or other folders whose names contained Cyrillic characters, then "Notepad" they may not be displayed correctly because the required encodings are not supported.

Option 2: Using a BAT file

This method is also not particularly complicated, plus it makes you feel a little like a programmer. The idea is to create a special file with an algorithm that will display a list of all elements in a folder in a separate text file. So, let's look at the instructions for this option in more detail:


The contents of this file can also be transferred to a text document in MS Word. However, in this case there are no problems with encoding and incorrect display of Cyrillic characters.

Option 3: DirLister

This free software does not require installation on your computer and with its help you can create a list of all the items in a particular folder. Instructions for its use are as follows:


Option 4: Total Commander

Total Commander is a popular file manager where the user can quickly obtain and copy all the basic information about files, as well as the contents of folders. In this case, you can get a list of files located in the folder as follows:


Option 5: Browser

All modern browsers, be it Opera, Google Chrome, Yandex, etc., have a function for viewing the contents of folders and some files located on the computer.

The instructions for this option are as follows:


These were all ways to list the contents in a file folder into a separate text document.

Some users, when working on a computer, need to get a list of files in a folder. Such a list may be needed for various purposes: to catalog files in folders, to compare contents in folders, to compile a list of films, music tracks, e-books, etc.

In many cases, the number of files can be very large, so manually compiling a complete list of files in a folder will be problematic. Let's say you have an electronic library stored in a folder on your computer, or you have a large collection of films. It will be impossible for even an enthusiastic person to remember all the contents of a folder or disk.

The way out of this situation would be to create a list of files located in this folder, and then save this list to a text file. In the future, the resulting list can be edited as necessary.

For example, I have a large collection of movies stored on external hard drives, each several terabytes in size, that I have collected over the years. Of course, it’s hard for me to remember all the names of the films that are stored on hard drives.

When I come across a film on the Internet, having a list of files in a folder, I can easily check whether such a film is in my collection, or whether I have come across a new film. Therefore, I began to search for a solution to this issue.

As a result, I found several simple solutions to this problem. You can create a list of files in a folder in different ways: using the command line, using a file that has the “.bat” extension, using special programs, or saving the list in the browser.

Saving a list of files using the command line

First, you will need to navigate to the desired folder, or drive, if you want to get a list of files that are on the drive. After opening a folder or drive, hold down the “Shift” button on your keyboard and right-click inside that folder. In the context menu that opens, select “Open command window.”

After this, a console window will open, in which the path to the desired directory will already be indicated (in your case, it will be to the folder that you open). In this example, this is the Applications folder on my computer's Desktop. This folder contains other folders that contain program shortcuts.

Dir /b>filelist.txt dir /s>filelist.txt

There must be a space after entering "dir". Instead of “filelist”, you can write your file name, only in Latin letters. Don't forget to add the ".txt" format at the end.
These commands differ in their use of additional criteria for saving a list of files:

  • /b - indicates that only file names will be saved.
  • /s - means that the list will additionally include all files and subdirectories (subfolders) that are located in this folder.

Then press the “Enter” button on your keyboard.

After this, you can open the folder and see that there is a text file "filelist" in the folder. You can now open this file using Notepad.

If some files in this folder had Russian names, then instead of the names of these files, you will see strange characters (kryakozyabra). The fact is that the Notepad program does not understand MS-DOS encoding.

Therefore, you can open the created file using Word. I assume that most users have this program installed on their computer.

Right-click on the text file, and then select “Open with” from the context menu. Select Microsoft Office Word to open the file. The “Text Conversion” window will open in the Word program window, in which you will need to select the MS-DOS encoding that will allow you to read this document.

In the sample you will see the correct display of the text.

After clicking the “OK” button, this text will be opened in Word. You can edit the document and then save it on your computer in the desired format, including the “TXT” format. There will be no problems with encoding after saving the file.

Getting a list of files in a folder using a bat file

One of the most accessible and simplest ways to obtain a list of files in a folder is to use a special bat file for this. There are several options for creating a file with the “.bat” extension, with different code.
To create a bat file, you will need to open Notepad and then paste this code there:

Chcp 1251 echo %date% %time% >filelist.txt dir /b /d >>filelist.txt

Save this file, you can give the file any name, the file itself must be given the extension “BAT”. The options for saving a file in Notepad will look something like this:

  • File name: filelist.bat
  • File Type: All Files

Next, place the created file in the folder from which you want to get a list of files located there. After that, run the file with the extension “.bat”. A “filelist” file will be created in this folder in the “.txt” format, which will contain a list of files.

There are several options for the contents of a file with the “.bat” extension. When using this method, there will be no problems with encoding.

DirLister program for obtaining a list of files

You can create a list of files located in a folder using the free DirLister program. This tiny program does not require installation on your computer. After downloading the program to your computer, unpack the archive with the program.

To launch the program, open the folder with the program, and then click on the DirLister application.

In the DirLister program window, in the “Directory To Scan” section, using the “Open” button, you will need to select the folder to scan.

In the “Output File” section, using the “Save As...” button, you will need to select a location to save the list of files.

You can refine the search criteria for files using the “*.*” mask by selecting the desired file name or file type (“TXT”, “Excel”, “HTML”, etc.). After selecting the required settings, click on the “Make List” button.

After scanning is completed, information about the successful completion of creating a list of files will be displayed in the lower left corner of the program: “All file processed correctly.”

The DirLister program displays not only a list of files in a given folder, but also provides complete information about the files and folders nested in this folder, including the size of the files.

Getting a list of files in Total Commander

You can get a list of files in a folder using the popular file manager Total Commander. To do this, open the desired folder in the program window.

In the “Selection” menu, first select “Select All”. After all the files have been selected, in the same menu select the “Copy names to clipboard” item.

Conclusion

Then open Notepad or another text editor and paste the list of files from the clipboard there.

You can select “Save selection to file...” from the “Selection” menu. In this case, you will need to name the file and then save it in "TXT" format.

Saving a list of files in a folder in the browser

You can get a list of files in a folder using a browser. First, open your browser and then drag the folder into the browser window. A list of files will open in the browser window. You can navigate between contents just like in Explorer.

Using these fairly simple methods, you can easily create a list of files that are located in a specific folder or drive on your computer. You can use the method that is most convenient for you to save a list of files.

3 ways to get a list of files in a folder



 

It might be useful to read: