theweaselking: (Default)
[personal profile] theweaselking
On a Windows XP machine, I have a folder with many hundreds of subfolders.

I want to delete all files of a given extension (.doc in this case) from the root folder and from all subfolders, without affecting any of the other files.

I could do this in one line in a *NIX environment, and popping open CygWin would certainly fix the problem that way, but I want to know: does anyone know of a solution in Windows that does NOT involve manually selecting every file or opening a different OS emulator?

(no subject)

Date: 2005-11-24 10:13 pm (UTC)
From: [identity profile] dolston.livejournal.com
Do a search of the root folder for all *.doc and then select all the files you found and delete them. Courtesy of Curtis who is quite clever.

(no subject)

Date: 2005-11-25 01:10 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Very clever. Not quite as simple as the unix or DOS command line ones, but is a workable Windows solution. Thanks.

(no subject)

Date: 2005-11-25 05:23 am (UTC)
From: [identity profile] dolston.livejournal.com
I'll pass that on to Curtis. I would have never thought of it.

(no subject)

Date: 2005-11-24 10:40 pm (UTC)
From: [identity profile] cmseward.livejournal.com
Start Menu -> Search, then All files and folders, then search for *.doc under either Local Hard Drives or just the C:. Select all of them and kill 'em. You should be able to choose which folder to start from, also, if it's not the actual root folder (C:\), and search all of its subfolders specifically. HTH.

(no subject)

Date: 2005-11-24 11:10 pm (UTC)
From: [identity profile] fortysevenbteg.livejournal.com
del /s *.bak

I use that to do exactly that. Deletes *.bak from the current directory on downwards (the /s = include subdirectories)

(no subject)

Date: 2005-11-24 11:47 pm (UTC)
From: [identity profile] cmseward.livejournal.com
I knew the dir /s worked like that, didn't realize it worked for del, also. Thanks.

(no subject)

Date: 2005-11-24 11:58 pm (UTC)
From: [identity profile] fortysevenbteg.livejournal.com
Anything to help. ;)

(no subject)

Date: 2005-11-25 01:09 am (UTC)
From: [identity profile] theweaselking.livejournal.com
Pretty much what he said. Never even thought of trying /s.

Thanks

(no subject)

Date: 2005-11-25 04:21 am (UTC)
From: [identity profile] sivi-volk.livejournal.com
Totally unrelated.

http://www.guardian.co.uk/uslatest/story/0,1282,-5437163,00.html

an easy solution...

Date: 2005-11-25 06:11 am (UTC)
From: [identity profile] da-philosopher.livejournal.com
Open directory. View "Details". Sort by type. Click on first file in list, shift click on last file in list. Hit delete.

Manual - yes. Easy shortcut in Windows. Yes.

Re: an easy solution...

Date: 2005-11-25 11:29 am (UTC)
From: [identity profile] theweaselking.livejournal.com
That covers all files of that type in one folder. I want all files of that type in the folder *and* in all 100+ subfolders.

Using your solution, I'd have to do this for each individual folder.

(no subject)

Date: 2005-11-26 12:21 am (UTC)
From: [identity profile] corruptedjasper.livejournal.com
I tend to use Total Commander for my serious file-management needs, when Explorer straight up just isn't working for me. Look it up, it's nagware but the nag is not particularly inconvenient.

Profile

theweaselking: (Default)theweaselking
Page generated Feb. 6th, 2026 06:20 am