Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: creating several files  (Read 2654 times)

0 Members and 1 Guest are viewing this topic.

Fernando

  • Guest
creating several files
« 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

Doomsday_J

  • Guest
Re: creating several files
« Reply #1 on: March 30, 2004, 08:14:28 PM »
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?

Computer Hope Admin

  • Administrator


  • Prodigy

    Thanked: 248
    • Yes
    • Yes
    • Yes
    • Computer Hope
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 10
Re: creating several files
« Reply #2 on: March 31, 2004, 02:10:50 AM »
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.
Everybody is a genius. But, if you judge a fish by its ability to climb a tree, it will spend its whole life believing that it is stupid.
-Albert Einstein

Erifash

  • Guest
Re: creating several files
« Reply #3 on: April 18, 2004, 12:04:43 PM »
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.