How do I batch create multiple files in Windows?

by Knocks   Last Updated June 30, 2020 02:01 AM - source

I need to create 500 empty files with names that are contained in filenames.txt, which contains 500 entries, with one line per entry. How do I do that in Windows?

Tags : batch-file


Answers 1


Try this:

For /F "Tokens=* delims= " %%a in ('type filenames.txt') do type nul >%%a

Note: If there are no extensions specified inside filenames.txt, then add it at last of the code.

Wasif Hasan
Wasif Hasan
June 30, 2020 01:52 AM

Related Questions


How to quickly copy *specific multiple* files?

Updated February 22, 2016 01:00 AM

Move files and create folders script on windows?

Updated July 20, 2018 07:01 AM

batch file ren command Self destruct

Updated October 11, 2019 10:01 AM

Batch - Do something if filename contains string

Updated July 27, 2018 09:01 AM