1.

Solve : How do I create new files in Batch??

Answer»

Sorry, but I didn't know what to title this so I just titled it what I did.

I'm MAKING a batch script for my friends, and I'll give it out here when I'm done with it to speed up your computer. I have the script right now, but want to make it so I can ALSO run in in "Scheduled Tasks".

It has a menu and all of that, but I want to make it so the user has to hit a certain KEY and the script will make a new file, and put in what I want in it, then save it as .bat. If possible, how can I do this?

Thanks a Lot! Code: [Select]@Echo off
Echo Hello World!!!>> Hello.txt
Type Hello.txtJust type what you need before the >>. So If I do this:

Code: [Select]@echo off
echo cd %drive%:\
dir /s/b/ad \cookies > %drive%\cleanup.txt >nul
dir /s/b/ad \history > %drive%\cleanup.txt >nul>>Cleanup.bat
start "Cleanup.bat"
It'll make that in a new file, then open it?If i want to CREATE a new batch file i'de do this:
Code: [Select]@Echo off
Echo @Echo off>> HI.bat
Echo Echo Hi!!!>> Hi.bat
Type Hi.batHi.bat will contain:
Code: [Select]@Echo off
Echo Hi!!!oh... ok, thamkls!



Discussion

No Comment Found