H
H
H0D0K2016-08-29 05:25:11
cmd/bat
H0D0K, 2016-08-29 05:25:11

How to create multiple files with names from one list and content from another?

Help someone who doesn't know how to program.
As I understand it, I need to create a batch file that creates a lot of non-empty files, the names of which are taken from one list located in the names.txt file , and the content (text in Russian: letters, spaces and, possibly, punctuation marks) from the second list , located in the contents.txt file .
Here I found the answer to how to create a lot of empty files using a batch file:
FOR /F %%i in (wer.txt) do cd. > %%i
The question remains how to make content from the second list taken?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-08-29
@skazi_premiere

type filename.txt > %%i instead of cd. > %%i
Write the contents of filename.txt to a new file.
UPD Fundamentally bat do?

E
Eugene, 2016-08-29
@yellowmew

contents .txt содержит единый текст для всех файлов или там есть какое то соответствие вида \
"filename1"="текст первого файла"
"filename2"="текст второго файла"
?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question