Computing.Net > Forums > Windows NT > Batch File Question

Batch File Question

Reply to Message Icon

Original Message
Name: morphine
Date: March 31, 2005 at 13:36:47 Pacific
Subject: Batch File Question
OS: NT
CPU/Ram: 1 GB
Comment:

I have a simple batch file that I want to delete the contents of a directory once a week:

-
@echo off
del d:\DB_1\Thu\*.*
@exit
-

I am running NT 4.0 Server and want to have it run as a scheduled task.

When I run the batch file manually it brings up a confirmation asking if I'm sure I want to delete. If I say yes it deletes the contents of the directory exactly as wanted.

How can get the bacth file to run without a delete confirmation? This is preventing it from working as a scheduled task.


Report Offensive Message For Removal


Response Number 1
Name: Mechanix2Go
Date: April 1, 2005 at 00:52:28 Pacific
Reply: (edit)

In NT5 you have the /q option.

Not sure about NT4.

With luck, this will tell you about options:

del /?

If /q is not available, use:

echo y|del

BTW, the *.* is superfluous. The degault is ALL.


M2

If at first you don't succeed, you're about average.


Report Offensive Follow Up For Removal

Response Number 2
Name: morphine
Date: April 1, 2005 at 08:42:13 Pacific
Reply: (edit)

Ok, I finally got it working using the /q switch. Thanks for your help.

I HATE NT 4!


Report Offensive Follow Up For Removal

Response Number 3
Name: Mechanix2Go
Date: April 1, 2005 at 08:45:42 Pacific
Reply: (edit)

Yeah NT4 has plenty of rough edges.

Solid but ornery.


M2

If at first you don't succeed, you're about average.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Batch File Question

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes Today.
Discuss in The Lounge