1.

Solve : creating several files?

Answer»

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,
FernandoYou 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.



Discussion

No Comment Found