DOS help - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Closed Thread
Thread Tools Display Modes
Old 09-06-2005, 06:59 PM   #1 (permalink)
Monster Techie
Join Date: Apr 2005
Posts: 1,909
Send a message via AIM to jcortes
Default DOS help

hey i was making a bat file and i was wondering if there is any way to automaticaly say yes to a condition like the DEL command.


AIM = jcortestechhelp
jcortes is offline  
Old 09-06-2005, 07:27 PM   #2 (permalink)
Wizard Techie
Join Date: Apr 2004
Posts: 3,247

add /y to the end, or for example:

deltree c:\windows\temp\*.* /y

if this is a problem then use echo, for example:

echo y | del %1\*.*

well, back to work

If you argue with an idiot he will drag you down to his level and beat you with experience.

I am not a fast writer.
I am not a slow writer.
I am a half-fast writer.

-Robert Asprin
killians45 is offline  
Old 09-06-2005, 07:37 PM   #3 (permalink)
Monster Techie
Join Date: Apr 2005
Posts: 1,909
Send a message via AIM to jcortes

wait im confused i want to make a file that will delete some corrupt files from a directory and i want to put it in that directory so wen i run it it deletes the files in that directory and i want it to not ask me if im sure i want to delete. also i dont have the deltree command on my comp so what do i do.

AIM = jcortestechhelp
jcortes is offline  
Old 09-07-2005, 08:49 AM   #4 (permalink)
It's all just 1s and 0s
office politics's Avatar
Join Date: Jan 2004
Location: in the lab
Posts: 6,555
Send a message via MSN to office politics

hmmmmm use arguments

batch file named cleanup.bat

del %1 /q


use wild card when running this file, cleanup C:\temp\*.*

the /q switch suppresses any are you sure prompts for wildcard deletions

instead of deltree, rmdir should be used

Removes (deletes) a directory.

RMDIR [/S] [/Q] [drive:]path
RD [/S] [/Q] [drive:]path

/S Removes all directories and files in the specified directory
in addition to the directory itself. Used to remove a directory

/Q Quiet mode, do not ask if ok to remove a directory tree with /S
office politics is offline  
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Our Communities

Our communities encompass many different hobbies and interests, but each one is built on friendly, intelligent membership.

» More about our Communities

Automotive Communities

Our Automotive communities encompass many different makes and models. From U.S. domestics to European Saloons.

» More about our Automotive Communities

Marine Communities

Our Marine websites focus on Cruising and Sailing Vessels, including forums and the largest cruising Wiki project on the web today.

» More about our Marine Communities

Copyright 2002-2015 Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 05:53 PM.

Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2016, vBulletin Solutions, Inc.