|
Make a List of Files in a Folder
You must already know how to use batch commands to use this page. I accept First you will create a Windows Batch program using a text editor (Notepad). Copy the batch program below using the "select" button and copying it into your text file. You must edit the paths in the sample batch program to match the location of your particular folder. You must not split long lines. Edit C:\****\ to match the path of the folder you want to list. Edit USER to your "user name". This batch program will create a text file called LIST.txt in the Documents folder. The second time you run this batch program, the file will be replaced, so rename it if you want to keep it. (See batch-date.html to learn how to add today's date to a file name.)
@ECHO OFF
ECHO Folder-List.bat REM Remove /s in command below to NOT list subfolders DIR C:\****\ /s /ad /b /on > C:\Users\USER\Documents\LIST.txt ECHO done... PAUSE EXIT The only required command line starts with "DIR". Here is an explanation of the switches used in that command:
Example 2: Listing all files on a DVDThis command creates a list of all files on a DVD drive D: and stores it in a text file DVD_XXXX.txt in the My Documents folder of a user called Cathy: dir E:\ /ogn-d/s > "C:\Users\Cathy\My Documents\DVD_XXXX.txt" |
||||||||||||||||||||||||||||||||||||||
The PDQ Library is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
|