Login

Please fill in your details to login.





super useful dos commands

Useful DOS commands to automate stuff

Generating a list of files in a folder


Navigate to the folder in question using Windows Explorer.
Copy the folder path.
Open up an Administrator command prompt.
Type CD " and then right click your mouse to paste the path from the clipboard. Type " and press ENTER. Make sure you have surrounded the path with quotation marks in case it has any spaces in it.
Run the following DOS command...

dir /B /ON > list.txt


...replacing the filename if necessary.

Create empty files from a list


Create a list of filenames using Excel, Google Sheets.
Copy the list into a text file using Notepad.
Save the file as list.txt in the folder where you would like the files creating.
Open up an Administrator command prompt.
Navigate the the same folder using the CD command.
Run the following DOS command...

for /f "delims=" %F in (list.txt) do copy nul "%F"


... replacing the filename in brackets with the filename you used if it was different.
Last modified: May 21st, 2023
The Computing Café works best in landscape mode.
Rotate your device.
Dismiss Warning