Skip to content
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

Merge folders upon conflict. #233

Open
telometto opened this issue Aug 10, 2022 · 2 comments
Open

Merge folders upon conflict. #233

telometto opened this issue Aug 10, 2022 · 2 comments

Comments

@telometto
Copy link

Is your feature request related to a problem? Please describe.
When targeting dirs, the possibility to merge folders if a folder with the same name exists in the destination dir.

Describe the solution you'd like
The ability to merge folders upon conflict.

Describe alternatives you've considered
I've tried doing so that for any conflicting folder, a number gets appended (I didn't get it to work, though).

Additional context
x

@tfeldmann
Copy link
Owner

That sounds like a nice feature. It could become a bit complex because many things could be configured like

  • recursive merges (with depth limit?)
  • conflict options for the files inside the folder (skip, overwrite, rename, overwrite if newer, ...)

I've tried doing so that for any conflicting folder, a number gets appended (I didn't get it to work, though).

Can you share your use-case? Folder targeting is relatively new and not so well tested at the moment, it might be a bug.

@telometto
Copy link
Author

My use-case is basically this: any "loose" file found, gets put in a directory unsorted_<type> which, in turn, contains sub-folders based on extension and, therein, folders based on date. The unsorted_<type> folders are created in the same dir the file was found ({path.parent}/unsorted_vids/{extension.lower()}/{created.strftime('%Y-%m-%d')}/).
Since the template is the same for every file/folder, I wanted to move every type (e.g. music, docs, etc.) to the location where it belongs, but it wouldn't allow me/organize reports that the folder exists in the dest dir.

For my use-case, it would be enough for me to have parent/subdir/subdir merged. I tried using rename: {name}{+1} but that (obviously) didn't work. If you got a way around it or some clever trick to just append a letter or a number to rename the dir upon conflict, that will do as well; I can then just manually move the sub-dirs where they belong 😊

E.g.
Screenshot from 2022-08-11 13-02-44
Screenshot from 2022-08-11 13-03-01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants