Computing.Net > Forums > Windows XP > bat files that delete folders on C:

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.

bat files that delete folders on C:

Reply to Message Icon

Name: ed123456789
Date: August 30, 2004 at 05:18:47 Pacific
OS: xp
CPU/Ram: p4/512
Comment:

how to create a bat files that delets folders on c drive path is
c:\program files\.....



Sponsored Link
Ads by Google

Response Number 1
Name: rayok
Date: August 30, 2004 at 06:20:46 Pacific
Reply:

in notepad write the following

deltree "C:\Program Files\*"

save it as ooops.bat or similar

deltree deletes folders, del deletes files, you have to put the path into speech marks as it does not follow dos conventions. * is a wildcard - it means anything. the wildcard for files is *.*

errr how are you going to test it ?

Techy n Welsh


0

Response Number 2
Name: johnr
Date: August 30, 2004 at 06:24:08 Pacific
Reply:

Here's a good page for teaching you the basics of batch files -

http://www.computerhope.com/batch.htm

beware how you use them to start deleting though, you don't get the usual 'are you sure?' prompts unless you put them in yourself.

"I know that I'm mad - I've always been mad..."


0

Response Number 3
Name: johnr
Date: August 30, 2004 at 06:30:08 Pacific
Reply:

By the way, the 'deltree' command doesn't, as far as I know, work under XP, you have to use 'rd' or 'rmdir'.

"I know that I'm mad - I've always been mad..."


0

Response Number 4
Name: rayok
Date: August 30, 2004 at 11:33:02 Pacific
Reply:

Sorry, yes, deltree doesn't work as per above

Techy n Welsh


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 XP Forum Home


Sponsored links

Ads by Google


Results for: bat files that delete folders on C:

bat file www.computing.net/answers/windows-xp/bat-file/114481.html

modify bat file to delete directory www.computing.net/answers/windows-xp/modify-bat-file-to-delete-directory/167071.html

Reinstall?Partion2 is folder on C www.computing.net/answers/windows-xp/reinstallpartion2-is-folder-on-c/141519.html