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

Dealing with already existing destination #30

Open
dufferzafar opened this issue Sep 6, 2016 · 3 comments
Open

Dealing with already existing destination #30

dufferzafar opened this issue Sep 6, 2016 · 3 comments

Comments

@dufferzafar
Copy link
Contributor

dufferzafar commented Sep 6, 2016

Currently, massren doesn't deal with already existing files and throws up an error:

massren: "/path/to/file" cannot be renamed to "/some/file": destination already exists

There could be multiple strategies for dealing with such cases:

  1. Append some integer to the file. Most browsers do this with downloads.
  2. Overwrite the destination file.
  3. Skipping this file (& not renaming it) but continuing with others.

For me, option # 1 is the most used one, but # 3 sounds sane too.

@laurent22
Copy link
Owner

Indeed that would be good to propose some alternatives. Overwriting would probably be what users would expect as this is how most posix tools work. However any overwrite or even renaming to something else shouldn't be automatic as that could cause a big mess if hundreds of files are involved.

Perhaps we should still display the current error message, but below ask the user what they want to do.

@ghost
Copy link

ghost commented Mar 20, 2018

Perhaps we should still display the current error message, but below ask the user what they want to do.

If we have a long list of files to be processed, always asking the user on each file can be tedious so I propose options, based on @dufferzafar suggestions.

A new config option like existing_files (or file_conflicts or existing_destination) with the options

append (or copy or duplicate)
overwrite
skip
ask

I agree that it should still show the error/warning message on each file, so we could output massren's output to file (will this work? massren -v >> ~/massren_log.txt) to keep track of the files that weren't renamed, if the skip option is set.

@06opoTeHb
Copy link

Hi. Is there any solution for this problem?

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

3 participants