Answer the question
In order to leave comments, you need to log in
How to create multiple files named from a list?
Hello.
Recommend a program or solution for Windows for non-programmers.
I have a list text document with 100 names, one name per line.
You need to create 100 empty text documents with these names. Names contain symbols: dots, hyphens, spaces, exclamation marks.
Maybe there is a program that generates files with names from an external list?
Answer the question
In order to leave comments, you need to log in
You can write a file yourself with the extension "bat", which will read the source file and create empty files from the list. Its content looks something like this:
Here "wer.txt" is your list text document. It is desirable that there are no spaces in this file name. You don't need to put quotation marks, because quotation marks in this particular situation imply some arbitrary string, not a file name.
cd. convenient to use if you need an empty output; "echo" simply may not work properly if you want to output exactly the empty string.
If you need to create files in some subfolder, the "cd. > %%i" can be replaced with "cd. > foldername/%%i"
Next, run this batch file and it will generate files from the list. It would be best if the file with the list and the batch file are in the same folder.
And yet, if the folder contains, for example, a 123.txt file with some content and, at the same time, the wer.txt file (the one you use as a donor list) has the same name, after working out the batch file get a 123.txt file of size zero. So, be careful with this - do not overwrite anything you need. Ideally, all this should be done in a separate folder, where there are no more files, except for the batch file and the donor.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question