Tag Archive | "dos"

Recursively Delete Selected Files or Folders In Windows

Tuesday, February 12, 2008

3 Comments

I was looking around for a way to recursively delete files and folders of a specific name in Windows. For example, imagine having “/folderA/folderB/file1.doc” and “/folderA/folderC/file1.doc”, and I wanted to remove all instances of file1.doc. Now imagine this file1.doc being presented in hundreds of folders. Deleting each file manually would drive anyone crazy. I know [...]

Continue reading...

Recursively Delete Files and Retain Folders in Windows

Thursday, January 3, 2008

1 Comment

I was trying to delete all files in the current directory and all subdirectories, while keeping the directory structure intact. I found that I could use the following DOS command to recursively delete files, and NOT touch the directories: ending in .doc del /s *.doc Do note though, that ALL files with the extension doc [...]

Continue reading...