Find and delete empty folders
-
- 4StarLounger
- Posts: 504
- Joined: 23 Jul 2010, 18:36
- Location: Westlake, OHIO
Find and delete empty folders
We have a process that was created in-house that unzips files into folders, deletes the zip file, and then the files in the folders are processed into our software. This leaves behind empty folders. The count of empty folders on one particular server is now well over 200,000 and graowing at a rate of about 300 per hour. Does anyone know of a tool that we could use to find empty folders and delete them? I have not found a biult in Windows tool to do this.
Who will you Inspire today?
-
- PlatinumLounger
- Posts: 3757
- Joined: 24 Jan 2010, 11:00
- Location: Lexington, KY, USA
Re: Find and delete empty folders
I don't know if anything here looks promising to you. I've never used software to do this job.
http://www.google.com/search?as_q=delet ... as_rights=" onclick="window.open(this.href);return false;
http://www.google.com/search?as_q=delet ... as_rights=" onclick="window.open(this.href);return false;
-
- 4StarLounger
- Posts: 504
- Joined: 23 Jul 2010, 18:36
- Location: Westlake, OHIO
Re: Find and delete empty folders
Thanks Al, I tried the iLivid from CNet and it did not even load properly. Actually, it does not have to be software, any script would be great too. My co-worker found a script on a different forumn ( for /f "usebackq" %%d in (`"dir /ad/b/s | sort /R"`) do rd "%%d" ) and the script is also failing.Bigaldoc wrote:I don't know if anything here looks promising to you. I've never used software to do this job.
http://www.google.com/search?as_q=delet ... as_rights=" onclick="window.open(this.href);return false;
Who will you Inspire today?
-
- PlatinumLounger
- Posts: 3757
- Joined: 24 Jan 2010, 11:00
- Location: Lexington, KY, USA
Re: Find and delete empty folders
I tried the first one ("RED") since I told you I'd never tried this before.
It installed and ran OK for me (Win XP MCE) and, get this, it found over 4 thousand empty directories on my "little old" machine.
I might take another look some other time, but I didn't let it delete anything without checking ALL of them to make sure it didn't go too wild. If your in-house thing is consistent, your search for empties might be easier to verify than mine. These are all over my hard drive.
I did see a "batch" script in that Google but it's quite old. Maybe John Gray will pop in here with a suggestion.
It installed and ran OK for me (Win XP MCE) and, get this, it found over 4 thousand empty directories on my "little old" machine.
I might take another look some other time, but I didn't let it delete anything without checking ALL of them to make sure it didn't go too wild. If your in-house thing is consistent, your search for empties might be easier to verify than mine. These are all over my hard drive.
I did see a "batch" script in that Google but it's quite old. Maybe John Gray will pop in here with a suggestion.
-
- 4StarLounger
- Posts: 504
- Joined: 23 Jul 2010, 18:36
- Location: Westlake, OHIO
Re: Find and delete empty folders
My coworker just admitted that he got the script I mention above to work. He needed to add the directory level in the middle (that is what he said, I do not know scripts). Anyway, this is solved now.
Thanks Al!
Thanks Al!
Who will you Inspire today?
-
- 4StarLounger
- Posts: 536
- Joined: 05 Feb 2010, 23:23
- Location: Whitehaven Cumbria UK
Re: Find and delete empty folders
Al,
Having watched your exchange with Timelord I thought I'd have a look-see and so downloaded RED and let it run. It found 1007 'empty' folders (I've had Windows 7 (H) for three years). To be honest I don't recognise what most of the folders represent (or did represent), so I think I'll give it all a miss and leave well alone. Would be interesting to know though just what, if any, impact having large quantities of empty folders has on performance, disc space, etc etc ?
Regards,
Having watched your exchange with Timelord I thought I'd have a look-see and so downloaded RED and let it run. It found 1007 'empty' folders (I've had Windows 7 (H) for three years). To be honest I don't recognise what most of the folders represent (or did represent), so I think I'll give it all a miss and leave well alone. Would be interesting to know though just what, if any, impact having large quantities of empty folders has on performance, disc space, etc etc ?
Regards,
Regards,
Keith
Keith
-
- PlatinumLounger
- Posts: 3757
- Joined: 24 Jan 2010, 11:00
- Location: Lexington, KY, USA
Re: Find and delete empty folders
Your "caution" equals mine. The only time I'd ever do anything "carte blanche" like that would be immediately following a full backup image, just in case.aekyall wrote:Having watched your exchange with Timelord I thought I'd have a look-see ...