I received an email during the day, from a visitor of Stealth Settings, who asked us the following thing:
[…] I searched on the site (what is right, not too much) a tutorial for Copying the names of files from a folder , in a text document.
Example: I have a folder full of pictures: DCS001.jpg, DCS002.jpg. DCS003.jpg, etc.
Well, I want that the name of these files to defend me in a txt About: DCS001, DCS002, DCS003, etc. I understood that it can be solved very easily from cmd, but I didn't find how. […]
Command dir in Command Prompt (CMD) – (MS-DOS Commands) has the role of File listing, Folders and subfolders. Command “dir“, like many other commands MS-DOS is present on all operating systems Microsoft. Windows 95, 98, ME, NT, Vista, XP… Windows 7 and supports a series of command lines (syntax).
To list the files, folders and subfolders in a directory, it is sufficient to open Command promptly, to navigate to the directory where the files are and to order “dir”.
Example: on Desktop (workspace) We have the folder called “6500“. In the folder “6500” HAVE 60 files .jpg (pictures) and a folder “Test – Stealth Settings“. If we want to list in CMD and/or export the names of the files inside the folder “6500” IN A document .txt, we follow a few simple steps.
*In our case the folder “6500” has the patch (path) D:StealthDesktop6500.
1. We open Command Prompt and we navigate to the directory “6500“. (Navigation in CMD is done by order “cd name_folder“. To change the partition, tutted the letter of the partitis and “:“, then press Enter)
*Users who use Windows Vista or Windows 7 they can open the CMD directly from the current folder. Keep the key “Shift” > click-right > “Open command windows here“.

2. Using the command “dir” List the content of the folder in CMD.

3 We export a list of folders and files inside the current folder, “6500” In our example, in a text file (.txt), give the order “dir > lista.txt“.

Inside the folder “6500” a file has been created lista.txt which contains all Name of files in folder. In addition it offers information about volume, date and number.

Command “dir” support a series of syntax which helps us to list in several ways and to sort the results. A number of commands “dir” are only valid for certain operating systems.
DIR Syntax in Windows 95, Windows 98 si Windows ME
[drive:] – the letter of partition; [Path] – The path / place where we want to execute the order.
dir [drive:][path] /P – List the pagged results. Useful for directories with many files. You have to press any key to move to the next page.

dir [drive:][path] /W – List the results on several columns.

dir /A – At this coma you will have to pass a specific attribute.
– dir /A D – only the directories.
– dir /A H – only lists Hidden Files.
– dir /A S – It only lists the files and system folders. System Files.
– dir /A R – only lists the read-only files.
dir /B – Listing of files without returning results about volume and date. The export in a .txt we make it using it dir /B > lista.txt .

More orders “dir” and Syntaxe supported by this command, find here.
Most syntaxs can be combined to obtain the desired results. We can sort the files listed by name, volume, date, extension, type … And so on Some of the command syntax “dir” They are not available on Windows Vista and Windows 7.
Microsoft DOS dir command in Windows XP, Windows Vista & Windows 7.
Good morning
Please you can tell me how the folder list of a directory in Windows 10 is made.
gracias