Step 1:
Create a new file in a text editor (i.e. open Notepad)

Step 2:
Insert the following text into the file:

Step 3:
Save the file as File List Generator.bat
Step 4:
To show the contents of a directory (folder) in a text file, simply copy or move the File List Generator.bat file into the folder where you want the contents printed and double-click the file.
This will save a text file with the contents of the folder and then open it in Notepad.
From here you can edit, format and print the contents.
In the above example the text file simply created a list of the files and folders within the directory. It is also possible to output other information about the directory such as date and time stamps, file sizes and drive information.
Step 1:
Create a new file in a text editor (i.e. open Notepad)
Step 2:
Insert the following text into the file:
Step 3:
Save the file as File List Generator.bat
Make sure this directory exists and that you have permissions to read/write or, adjust the path to point to another folder. For instance:
The above code would save the file to the top level of the C drive.
Step 1:
Click Start, then click Run...
Step 2:
Type cmd into the entry box and click OK
Step 3:
From the windows command line, navigate to the directory/folder that you want to save to the text file.
Step 3:
To output all the contents (files and folders), type:
To output only folders, type:
Step 4:
Type exit to close the command line.
A text file (some-file.txt) will be saved in the same directory from where the command was made.
Go back to the How-to Guides main page.
Offering small businesses and individual users the opportunity to have their own website on the internet, our 'starter websites' are available for only £150.
To find out more and to see an example of the type of site offered, view our example starter website page.