flash and CD autorun to misc file

Questions about programming languages and debugging
Post Reply
User avatar
Kirk
suck-o enforcer
suck-o enforcer
Posts: 547
Joined: 25 Apr 2009, 16:00
14
Contact:

flash and CD autorun to misc file

Post by Kirk »

I'm trying to make a .bat file that will delete certain files when ran. I've googled the shit out of this and nothing I do seems to work and I'm running out of CD's. this is what i have:

Code: Select all

cd\
del C:\Documents and Settings\Majestic Adventures\Desktop\kirk1
del "C:\Documents and Settings\Majestic Adventures\Desktop\kirk2\kirk3"
rmdir /S/Q C:\Documents and Settings\Majestic Adventures\Desktop\kirk2
Echo Deleting Files
Echo Files Deleted
Pause
exit
I've tried everything I can think of. I keep getting an error that says 'the system cannot find the file specified.' How is that? I told it were to go. What am I doing wrong guys?

Thanks

User avatar
leetnigga
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 447
Joined: 28 Jul 2009, 16:00
14

Post by leetnigga »

Firstly: just save this as a batch file on your desktop. You've already shown that you can run batch files from a CD on autorun, now you just need to get the batch file right. You don't have to burn new CD's for that every time, only when it's done. Edit and try it on your desktop until you get it right.

Secondly: what is it that you're trying to do? What's the point of the first line? Which folders are you trying to delete? Why are you echoing "Deleting Files" after deleting files?

The second line in your script looks bad. With spaces in file/folder names you have to add quotes like you did on the third line.

User avatar
Kirk
suck-o enforcer
suck-o enforcer
Posts: 547
Joined: 25 Apr 2009, 16:00
14
Contact:

Post by Kirk »

Thank you DrVirus and leetnigga. You guys a my hero's for today. I was running the echo so I could watch it happen. Those will be deleted. Such a simple few lines can cause such disaster. Kinda scary. Thanks again.

Post Reply