-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Folder collapse (move all files to root) #9269
Comments
Would love to better understand the scenario when you'd use this. You're talking about the "what" but not the "why" |
Actually, I could think of a few use cases for this. |
Would love to see something like this. I think it's simple enough so that I could try and script this. Although it obviously needs logic to deal with duplicates. But, I would use AutoIt and that's not a language that will fit in a project like PowerToys. Also, it can compile to fully stand-alone exe's, but there's something in the compiling process that causes anti-virus software to seriously flag it like a trojan or something. There are so many languages and I just don't know the most common ones good enough to use them. I think a batch file (if that works) would be the simplest solution/language? |
Thanks for the interest!
I can relate to that almost too much ;( |
Okay, so I made a
If anybody is interested: here is a zip file with the (standalone) exe, script, icon and readme files. If you want to use the script, you can install the software here, then compile. After that, create one or two registry entries (noted in the P.S. if anybody knows how to translate this into a .bat file or something, let me know? The context menu entry is easy to make. |
Here I was, being incredibly difficult, when @sredna had an excellent comment with a simple sulution:
I tested it and it works, only...
|
I guess I misunderstood. Remove Rather than fighting batch syntax I would recommend that you write this in another language. Even Powershell is able to call |
@sredna can't blame you. Looks like you just included the source folder. As I said: "i would expect..."
But we do! At least your input is 500% easier than my approach 😂 Whatever the exact language/code, it helps a lot towards having a solution for this request. So again: thanks! |
This is slightly more serious, it uses the shell copy engine to move the files. Keep in mind that I don't know C# nor PowerShell so I'm sure it has many bugs. |
I can give a new example
Potential outcome 1: Files folder is eliminated because it is an autogenerated folder by thingiverse that does not itself contain any files only other folders. Then the subfolder names are concatentated into their file names. Filenames can then be further cleaned using the PowerRename Power Toy.
Potential Outcome 2: Toggle off filename concatenation and instead only put the information into a comment ID3Tag, or just delete all information completely.
|
I think this is a great idea, and I've had the need to flatten a deeply-nested directory structure a few times in the past. However, I wonder if an alternative is possible by creating a separate non-destructive 'view' of the files rather than the process of moving everything into the parent folder and then removing all the child folders. I tried developing such a tool a while ago with a virtual filesystem, but never finished it. I also have a PowerShell script which creates a folder of symlinks representing the nested files, which I'm happy to share if anyone is interested, but I imagine a pure C# implementation would fit better with PowerToys. |
FYI - the Files app now has this ability as an experimental function. |
📝 Provide a description of the new feature
Idea for a new PowerToy: create a new entry in a folder's context menu called: "Dissolve Folder" to release all contents of that folder and every subfolder contained in it outside of it. I'll make an example.
Before running Folder Dissolver:
After running Folder Dissolver:
I know there are ways to make that happen using a .bat file or search, but I feel like an option in the context menu would be much simpler and less clunky to use for me and everyone else that needs it, and a really good quality-of-life addition to the PowerToys suite.
I'm also referencing #6388 because it sems to be a container for all new ideas.
If you'd like to see this feature implemented, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: