Creating Batch Files in WIndows XP

Thread Solved

Join Date: Mar 2004
Posts: 54
Reputation: Khiladi420 is an unknown quantity at this point 
Solved Threads: 0
Khiladi420 Khiladi420 is offline Offline
Junior Poster in Training

Creating Batch Files in WIndows XP

 
0
  #1
Nov 10th, 2005
Im trying to create a batch file to remove a directory in Windows XP, obviously it asks whether you want to delete the directory yes or no, but i want it to delete automatically without it prompting me everytime for the yes/no, i have tried many switches like DEL /y & DEL | Y & a few more but none work for XP , is there anyway to get round this?
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 642
Reputation: swatkat is an unknown quantity at this point 
Solved Threads: 50
swatkat's Avatar
swatkat swatkat is offline Offline
Small Town Boy

Re: Creating Batch Files in WIndows XP

 
0
  #2
Nov 10th, 2005
Hi,
You can use the rd command. Syntax is as follows:-
rd /s /q foldername

/s => Delete all files and subfolders in addition to the folder itself.
/q => Quiet - do not display Y/N confirmation. Assumes "Yes" as answer.

More info:-
http://www.ss64.com/nt/rd.html


By the way, in Windows 98/ME, you can use deltree command. Syntax is as follows:-
deltree/y foldername
/y => Do not display Y/N confirmation. Assumes "Yes" as answer.
"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."
-Albert Einstein.
Reply With Quote Quick reply to this message  
Join Date: Mar 2004
Posts: 54
Reputation: Khiladi420 is an unknown quantity at this point 
Solved Threads: 0
Khiladi420 Khiladi420 is offline Offline
Junior Poster in Training

Re: Creating Batch Files in WIndows XP

 
0
  #3
Nov 11th, 2005
Thanks for the tip, works perect!
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Windows NT / 2000 / XP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC