Computer Hope

Microsoft => Microsoft DOS => Topic started by: Manish Patel on October 25, 2004, 03:25:47 AM

Title: Creating within a Batch File
Post by: Manish Patel on October 25, 2004, 03:25:47 AM
In order to help do some error trapping I require the ability to create a file from within a .BAT file.

Tried looking at the usual DOS commands and cannot find one that allows you to create a file.

Any ideas would be Great.

Thx.
Title: Re: Creating within a Batch File
Post by: scruge on October 25, 2004, 07:30:46 AM
take a look at ">" and "copy" for file creations.
Title: Re: Creating within a Batch File
Post by: franksimari on November 16, 2004, 02:55:29 PM
this will work for what I think you want to do
make a batch file called,  makefile.bat

echo off
cls

echo  hit the enter key when you are finished
echo  then hit the f6 function key
echo  then enter
echo   the file formed here is called   myfile
echo  you might want to rename it  or else next time
echo you run this it will be overwritten

copy con  myfile