PDA

View Full Version : batch files (W2K)



kyoteg
05-11-2004, 09:34 AM
I would like to create a batch file that will delete the contents of a particular file. I want to set it as a scheduled task that will run when nobody is using the computer. The file name is Printque. I would appreciate any help you could offer.

Thanks in advance!

Jama
05-11-2004, 02:12 PM
Put this line in your batch file

Cmd /c exit >D:\Printque.txt

Change D:\ Printque.txt to the full path of the file on your system -in double quotes if it contains spaces.

The above command runs Cmd, executes the Exit command and writes its output to D:\ Printque.txt overwriting it's content. Since the Exit command produces no output at all, the resulting file will be empty.


Jama