Computer Hope
Other => Other => Topic started by: Fernando on March 25, 2004, 03:59:03 AM
-
To create a file in msdos you type:
copy con myfile.txt +enter
and then the text and CTRL + Z.
But, how can you do in a .bat file to create several files without having to type CTRL+Z every time? Is it possible?
Thanks in advance,
Fernando
-
You have to create the batchfile in the DOS editor like this:
Create you batch file, by using:
Edit myfile.bat
Inside the editor type:
edit myfile.txt
Using the Dos Editor is alot easier than using Copy Con
Is that what you mean?
-
I think you mis-understood him doomsday, as far as we are aware there is no way to create multiple files using the copy con command and a batch file.
-
Yeah, there is! But not with copy con...
Here:
@echo off
echo (Put whatever commands you want executed here (even another echo))>>BAT1.BAT
echo (Put whatever commands you want executed here (even another echo))>>BAT1.BAT
echo (Put whatever commands you want executed here (even another echo))>>BAT1.BAT
echo (Put whatever commands you want executed here (even another echo))>>BAT2.BAT
echo (Put whatever commands you want executed here (even another echo))>>BAT2.BAT
and so on...
Or did you mean user input?
In that case, it's better to use the EDIT command.