Automatic Script
Can someone give me the syntax for a script that automatically deletes a specific directory at a certain time each week?
Also, where should this script be placed and what causes it to execute?
Windows Forum
Can someone give me the syntax for a script that automatically deletes a specific directory at a certain time each week?
Also, where should this script be placed and what causes it to execute?
by syscokid
In NT, use the AT command.
To do this, first, make sure the sceule service is running. Then at the command propmt, type, for example,
AT 12:00 every:F rd c:\temp
Check out the full sntax for AT by typing "at /?" at the comand prompt. If you have the NT Resource Kit, use WinAT, a GUI version.
by beavis
by syscokid
AT.EXE is a program located in C:\winnt\system32. Its job is to execute commands at times you specify.
To use it, you must have the schedule service running on your machine.
To make sure the Scheduler Service is started:
In Control Panel, select Services.
Scroll down to Schedule and see if it says Automatic and Started.
If it says Automatic and Started, you're done.
If it says Automatic, but not started, press Start.
If it does not say Automatic, press Startup... Select Automatic, press OK and then press Start.
Now create a batch file to delete your directory. Let's call it Dirdel.bat and store it in C:\temp.
Let's say we want to run it every Friday at 6:00 AM.
At the command prompt type:
AT 6:00 /every:F "C:\temp\dirdel.bat"
You can specify any time you want, using the 24 hour clock (e.g., 11PM is 23:00).
When you press enter the job is scheduled. You can use the AT command to schedule many such tasks. You can also see what tasks are scheduled by typing AT alone and pressing enter.
by beavis
Thanks, but this doesn't help me much. I need to know where the AT file needs to be stored and exactly what the syntax is. I don't understand what the AT/? is telling me to do.
Also, the Command Scheduler GUI doesn't make a lot of sense to me.
by beavis
This discussion is closed to new replies.
Sort by Trending