Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete Files Recursively 1

Status
Not open for further replies.

theDabster

Technical User
Dec 23, 2001
21
US
Folks,
Are there any file deleting utilities available that will let me delete files from a folder and all subfolders at once? eg., Say I want to delete all files like fil*.ht* from "MyTopLevelFolder" and all the subfolders underneath it.

Any assistance is appreciated,

Dave
 
You're averse to DOS commands?

Go to Start/Run and type in
deltree(space)/?
and hit enter.
What's returned are the switches for the command...and it'll do what you're asking.
You may have to reset attributes and you'll probably find that and more here:
 
Ooooops!! I worded my question incorrectly. I want to delete only a certain type of file from the "top" level folder and that same type of file from any subfolders (NOT the subfolders themselves). Sorry for not being exact.

And, no, gargouille, I'm not averse to DOS commands, it's just that I haven't kept up with all the switches. But I did discover that the version of DEL buried in command.com that came with Win98SE does not include a /s switch for spidering down through subfolders. Thanks, though, for your reply.

Dave
 
Is this something you want to automate? if not it is pretty easy to go to Start>Find>Files or Folders: use your wildcard in the search line and point it to the proper DIR.(include subfolders) Edit>select all> Delete If it is something you do alot in the same DIR SAVE the find to use again.

to automate in DOS, here's a workaround- Use pk-zip's free dos version in a batch to MOVE the wildcards (it will recurse)into a zip then delete the zip. If you are a batch-o-matic type of guy you could probably even require input for PATH and wilcards if those things change alot.

Seeya.
Bruce
 
Bruce (roamer1),
Your tip on using Find did the trick - and it's so obvious - once I read it.

Thanks,

Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top