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:
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?
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.
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.