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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Batch File Question

Reply to Message Icon

Name: morphine
Date: March 31, 2005 at 13:36:47 Pacific
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.



Sponsored Link
Ads by Google

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

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.


0

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

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

I HATE NT 4!


0

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

Yeah NT4 has plenty of rough edges.

Solid but ornery.


M2

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Windows NT Forum Home


Sponsored links

Ads by Google


Results for: Batch File Question

Easy Batch file question www.computing.net/answers/windows-nt/easy-batch-file-question/6978.html

Auto answer questions in batch files www.computing.net/answers/windows-nt/auto-answer-questions-in-batch-files/9448.html

IPCONFIG Batch File? www.computing.net/answers/windows-nt/ipconfig-batch-file/14539.html