I am having an Input file in the location C:/temp/sample.txt
, which consists of one word in each line of the text file. For supporting UI, I need each line to be displayed as text file in front end. So I want a batch script which will produce output as text files for each line of the input text file in the same folder. Can you please suggest whether it is possible to make it?
Asked
Active
Viewed 3.1k times
2

Paolo
- 20,112
- 21
- 72
- 113

user2582367
- 43
- 1
- 2
- 8
2 Answers
6
It is possible with the "for" command:
for /f %i in (input.txt) do echo. > %i
Use %%i in batch files instead of %i.

bkausbk
- 2,740
- 1
- 36
- 52