Batch files! Help with 'del' command

Zatos

Limp Gawd
Joined
Dec 1, 2005
Messages
158
Alright, so old DOS commands still have relevance... I'm making a batch file to copy some files and then delete them afterwards. Is there anyway to make the 'del' command auto delete without asking (or rather, bypassing) the delete confirmation?

Also, can I use the windows scheduler to auto run this batch file, or is there another program you could suggest?

Thanks for the help!
 
Open a command window and type: del /? That should show the syntax and switch options. Also see : move /? if you want to copy files from source to destination and then delete the source.

Yes the batch can run from scheduler.
 
ne1wantaride said:
the del command shouldn't ask for confirmation.
It does if you use wildcards.

Code:
del c:\test\* /Q
That's the format you want.
 
I second the move recommendation. Sounds like that's really what you want to do in the first place. If you specify a whole path with extention it will even rename them for the move. There is also no harm in over using "md," so whatever you are ediiting your commands in, you can push all the directories in as md commands first.

I just use excel for situations just like this. Chopping off trailing parts of the path, dump a file list in column A, with what I want to rename to in column B, then build my statement with column C.... on and on. Batch files are far from dead.
 
Anyone else know of another scheduler program I can use besides the Windows scheduler? It sucks ass... I could get it to work, but I'd rather not have to set up a password because the person's computer I'm doing it to doesn't want one. :(
 
If the person does not want a password cause they are too lazy to type it in at startup, you can use CONTROL USERPASSWORDS2 applet to set Windows to auto login with their account and password at startup, or you can use the admin account to run these batch files from the scheduler.
 
Is there anything else? I'm not quite sure exactly what you're talking about...
 
Zatos said:
Is there anything else? I'm not quite sure exactly what you're talking about...

give user password

however, make windows autologon without the need to type password (use info above ur post)

windows scheduler will now work
 
Give the account a password then type this into the start menu run box CONTROL USERPASSWORDS2 and you will see how to work it.
 
Back
Top