Generating a new file out of an existing file

October 7, 2009 at 11:58:43
Specs: Windows XP
Hi there!
When a user runs a .bat file, it must create a new batch file AND do the commands in that file in the same directory. Is this possible? I have made a schedule that could explaine it somewhat more.

See More: Generating a new file out of an existing file

Report •


#1
October 7, 2009 at 13:50:52
Homework?

You could create the second bat file by echoing the commands to newbat.bat then calling that bat.

Something like:

>newbat.bat (
echo dir /b /a-d
echo echo %time%
echo echo %date%
)
call newbat.bat
del newbat.bat


Report •

#2
October 8, 2009 at 08:58:44
Thanks. That helped, I didn't knew or found that commands.

Report •

Related Solutions


Ask Question