0

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?

2
Contributors
2
Replies
3
Views
12 Years
Discussion Span
Last Post by Khiladi420
0

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.