DOS help - Techist - Tech Forum

Go Back   Techist - Tech Forum > Computer Software > Microsoft Windows and Software
Click Here to Login
Closed Thread
 
Thread Tools Display Modes
 
Old 09-06-2005, 07: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, 08:27 PM   #2 (permalink)
Wizard Techie
 
Join Date: Apr 2004
Posts: 3,247
Default

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, 08:37 PM   #3 (permalink)
Monster Techie
 
Join Date: Apr 2005
Posts: 1,909
Send a message via AIM to jcortes
Default

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, 09: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
Default

hmmmmm use arguments

batch file named cleanup.bat

del %1 /q

:eof

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
tree.

/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




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -5. The time now is 03:19 AM.


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