Discussion Locked

NT Scheduling

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have submitted an AT command which is supposed to run a batch file that will delete a certain directory's contents on a certain day at a certain time.

Whenever I double-click on the batch file, it just opens the ms-dos window quickly and then closes. It hasn't properly worked yet. I have properly submitted the command in the the scheduler. I'm pretty sure the problem is with the batch file.

Can someone give me the proper syntax for the batch file to delete a specific directory? Right now I only have delete c:\directory\*.*

7 replies

by dkpalmer

For starters, you need to use the /q switch - otherwise the command will hang at a Y/N prompt asking if it's OK to delete.

del c:\directory\*.* /q

That's probably your problem.
Also, make sure that permission changes on the directory are notpreventing the scheduler from deleting the files.

by dkpalmer

Have you tried running the batch file from a cmd window? Also, try putting a "pause" command after the delete command - there may be an error message that's not visible running the file from the GUI.

by aspiring_one

I added the switch and it didn't make any difference. It never hung at the yes or no prompt without the switch. When I double-click on the batch file, the screen just pops up as if it is executing, but it doesn't do anything to the directory contents.

I submitted the task using my domain adminstrator account and I belong to a group that has full control over the directory, so I don't see how permissions could be a problem.

Any ideas?

by reply

Hey

1. You should execute your Batchfile from the cmd Window to check for msgs.
2. Check if you did use the /F switch. If you didn't you have problems with write protected files and your batch will be aborted.

This discussion is closed to new replies.