Remove-Empty-Directories
Remove-Empty-Directories copied to clipboard
Looking for beta testers for new release 2.3
Hi everyone! I finally had the time to compile and package a new version of RED :blush: It includes recent community contributions and I also made quite a few changes, mostly regarding the user interface. The most visible change is probably the separation of the settings tabs into three different tabs. I did this because I thought that the old tab looked very crowded. Additionally, I wanted to add more info about the options and explanations. I hope the settings are more user friendly now.
I would be very happy if some of you, could try the new version and give me some feedback. I also tested the installer and RED itself extensively on my computer and in different virtual machines (Win7/32 Bit, Win10/32 Bit & Win10/64 Bit). I also made some batch files to test different test cases (like special chars). You find that in the repo if you are interested.
You can download the beta version of the new release over here: https://github.com/hxseven/Remove-Empty-Directories/releases/tag/2.3-beta.0
Just found this tool and tested out the beta for a fairly simple use case.
I wanted to pull in only certain changes to a work project from an exporter we use which gives us some boilerplate files/code based on the project spec. I dropped all the files into my project then only staged a specific lines with changes I wanted to keep (sounds weird I know, but it saved me a ton of time). Committed the lines I'd staged then discarded all remaining changes. Problem is that left ~40 empty directories behind since git only deletes the files.
I downloaded the new beta (on windows) and ran it one directory above where I'd added and removed files. The beta found all the directories I wanted deleted and also did not detect any false positives. Thanks for the great and simple to use tool!
For your reference here's the basic folder structure I ran it on: top -sub1 --emptydir --emptydir --emptydir --emptydir --some files in sub 1 -sub2 --emptydir --emptydir --emptydir --emptydir --some files in sub2
etc with a whole lot more subs and plenty of non empty directories at the same level as the empty ones. Hope this feedback's helpful.
The new version completely wiped my carefully selected ignore list and replaced it with a standard one...
Even starting the old version doesn't bring me back my ignore list. Now I have to take several minutes again to check, which directories I didn't want to be removed.
Edit: I found the config file vor version 2.2.0.0, where my directories still where inside. I dunno why the old version still did only show the same default one suddenly.
You might want to import the old file if present.
The program deletes an empty Windows / TEMP folder. You need to put this folder in an exception. F-Secure Freedome VPN does not work without this folder.
Put it in your user exception. The fact that the program fails simply because of a missing TEMP is just dumb. Considering it's F-Secure I guess I shouldn't be surprised
The program deleted more than 200 blank folders. I had to spend half a day to find the cause because of which the F-Secure Freedome VPN does not work. You imagine how it is among 200 remote empty folders to find the only folder you want to save.
Pro tip, dont run it on System folders like the root of the OS drive or any Windows folder
Love this app. It'd be great to have a scheduling option. I've sent Windows Storage Sense to automatically delete things from my downloads folder that haven't been open in a month (I'm good at moving things I wish to keep to more permanent folders, so this is typically just installers and the like); but it leaves empty folders. It'd be great to be able to schedule a daily scan and delete of empty directors in that folder.
Love this app. It'd be great to have a scheduling option. I've sent Windows Storage Sense to automatically delete things from my downloads folder that haven't been open in a month (I'm good at moving things I wish to keep to more permanent folders, so this is typically just installers and the like); but it leaves empty folders. It'd be great to be able to schedule a daily scan and delete of empty directors in that folder.
Rather than add a scheduling interface, I would recommend implementing a command line interface. This will allow one to make use of pre-existing Windows scheduling apparatus such as Task Scheduler.
Rather than add a scheduling interface, I would recommend implementing a command line interface. This will allow one to make use of pre-existing Windows scheduling apparatus such as Task Scheduler.
Task Scheduler is what most apps use. You check a few boxes, tell it what to do, and it creates a task in Windows Task Scheduler.
Can you statically link alphaFS ? I liked that RED used to be a one-file tool.
Worked just fine for me. Simple to use. Had a directory with over 100 sub-directories and it cleared out 66 of them. Some had 0 length files in them, which I was happy to see would be deleted as well.
The program deleted more than 200 blank folders. I had to spend half a day to find the cause because of which the F-Secure Freedome VPN does not work. You imagine how it is among 200 remote empty folders to find the only folder you want to save.
This is a you problem. Don't use the tool on windows or system folders.
@vissjb @Vlad-78 I'd even say it is a "they" problem. Any software - like F-Secure Freedome VPN in this case - should create files and folders when needed. If it cannot create a file beacuse it does not check whether the folder exists for example, then I would consider this a bug in F-Scure code.
I agree with the comment above, a dev has to test all error cases. I just downloaded and tested the beta directly on my C drive (for me it's F because I installed my windows from another windows, so C letter was taken), it worked flawlessly!
just curious if anyone can point me to where the "portable" version is saving its settings? doesnt seem to be creating any config or ini in the directory in which its ran, yet its definitely saving changes i'm making. at first glance not seeing anything in the usual places %appdata% %localappdata% %programdata% though it could be named something that im overlooking so apologies if thats the case.
as a secondary inquiry, how safe is this to run against the aforementioned 3 directories? I've been pruning some old stuff by hand but id prefer to "not" do that and as such my googling had led me here.
finally, thank you to the dev. you open source guys are modern day heroes to the non programmers amongst us <3
just curious if anyone can point me to where the "portable" version is saving its settings?
Should be in C:\Users<username>\AppData\Local\Jonas_John\ at least I found my settings in there.
ah yes, entirely overlooked. I was searching for RED or removeemptydirectories etc. Thank you!
perhaps its a difference of opinion on what constitutes a portable app, but id prefer the settings be saved alongside the executable if thats an option for a future version. #shameless :P
ah yes, entirely overlooked. I was searching for RED or removeemptydirectories etc. Thank you!
perhaps its a difference of opinion on what constitutes a portable app, but id prefer the settings be saved alongside the executable if thats an option for a future version. #shameless :P
I agree. This is what any portable app should actually do. If it doesn't, it's actually not portable, since you would have to access a non-portable storage medium for the settings to go with you..
Thanks for making a new release. I've just been using batch scripts or PowerShell scripts, but I love GUI's! I'll be testing this on local folders, NAS, UNC paths to different shares, etc. I'll let you know if I find anything and if I am able to fix it myself or not. Thanks again!
ah yes, entirely overlooked. I was searching for RED or removeemptydirectories etc. Thank you! perhaps its a difference of opinion on what constitutes a portable app, but id prefer the settings be saved alongside the executable if thats an option for a future version. #shameless :P
I agree. This is what any portable app should actually do. If it doesn't, it's actually not portable, since you would have to access a non-portable storage medium for the settings to go with you..
I agree, too
I get this when I have it integrated in a context menu.
BuildNumber Caption OSArchitecture Version
19045 Microsoft Windows 10 Pro 64-bit 10.0.19045
Thank you for this new version. As far as I know, there is no possibility to change application language (in my case, French). Is there any work or development in the future ?
Will this tool ever get updated again?
Still need testing? Any bugs found in the 2.3 Beta other than the comments above? (on the issues page, the only thing that I recognized as potentially significant is "Exception when attempting to protect the root node in the treeview".)
I need to de-duplicate several of my old backup drives. During that process I have used RED a lot because Duplicate Cleaner Pro doesn't clean up directories that were emptied. I can catalog the target folder with WinCatalog before running RED and then when I update the catalog it will list the changes (which should be a list of empty folders and files). The catalog will also show the size of all folders, which shouldn't change.
Any other ways that you test this on real data?
Could copy the target and then compare the copy to the post-red original, but slow for large targets.
I see that someone used the FindFiles plugin of TotalCommander to count the empty folders. I can do the same in WinCatalog to compare to the RED result.
Back again on localisation (for my example it's in french). Is there a way (excepted by modify sources files) like reference files "English.cfg" "German.cfg", "French.cfg"... I can help for french part.
Been using this tool since the beginning, so great! I just downloaded the portable version of the beta and it doesnt appear to save the configuration in the local portable folder. I am assuming it is being saved in one of the windows user data directories. To make it truly portable and shareable between computers can you consider saving the user settings in the local portable folder? Cheers!