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

Skip duplicate file. #238

Open
Idiotten opened this issue Jul 9, 2021 · 8 comments
Open

Skip duplicate file. #238

Idiotten opened this issue Jul 9, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@Idiotten
Copy link

Idiotten commented Jul 9, 2021

When copying a bunch of files from one folder to another on Mac, the popup box will give you three option: Skip, Stop, or Keep Both. Using skip allows you to quickly back up files by just dragging a whole folder and skipping (checking the "use for all" box) ones you already backed up, this way it only copies over new files that need to be saved.

OpenMTP doesn't seem to have an equivalent option, when copying duplicate files it gives you a dialogue box with only "Yes", and "No." to merge and replace them. If you hit yes, it will copy EVERY file and replace it - wasting a ton of time. If you hit "No" it just stops the process and nothing is copied. Since the main usage of a program like this is to either transfer a very large file, or back up lots of small ones as swapping individual files is easier to do over Wi-Fi than wasting time plugging in cables, I think it would be a pretty important addition assuming I didn't just miss the option somewhere.

For instance, I back up my photos from my phone to a hard disk using it. I already have 6000 photos from my SD card backed up, and only need to copy the additional 1000. As is, I have to copy and replace all previous 6000 photos instead of just skipping over them and only copying the 1000 new pictures.

@Idiotten Idiotten added the enhancement New feature or request label Jul 9, 2021
@Slooti
Copy link

Slooti commented Jul 21, 2021

I would very much appreciate this feature as well :) !

@ganeshrvel
Copy link
Owner

One of the main challenges here is, how do the app understand whether the previously copied file has completed or not?

If I use file names to compare and skip the files a partially copied file will be also skipped. I cannot use md5 to compare the file before copying, this is not possible on MTP.

Any thoughts on this?

@Slooti
Copy link

Slooti commented Nov 15, 2021

I'd personally not go down a route with partially copied files. They only make sense if you can resume a half copied file. You could achieve this, by giving them a temporary name or file extension and renaming them, when they are copied fully.

Event if you want to go with partial files, giving them a temporary name might be a good option. Then you probably need checking on how many bits you have already copied.

@ChaimHong
Copy link

I would very much appreciate this feature as well :) !

@ChaimHong
Copy link

One of the main challenges here is, how do the app understand whether the previously copied file has completed or not?

If I use file names to compare and skip the files a partially copied file will be also skipped. I cannot use md5 to compare the file before copying, this is not possible on MTP.

Any thoughts on this?

sorry,Cannot verify md5 of file before transfer?

@jkrauze
Copy link

jkrauze commented Jun 21, 2022

One of the main challenges here is, how do the app understand whether the previously copied file has completed or not?

If I use file names to compare and skip the files a partially copied file will be also skipped. I cannot use md5 to compare the file before copying, this is not possible on MTP.

Any thoughts on this?

An option to "skip the file if the size is the same and it hasn't been modified on the phone since the last backup" will be enough for lots of the use cases.

If the local file size doesn't match or the file on the phone has been modified later than the local file, then copy the whole file again. This procedure easily covers new files, modified files, and unsuccessful transfers.

This is how rsync works by default (without -c flag) and it's great for doing regular backups.

@r3a1d3a1
Copy link

r3a1d3a1 commented Aug 2, 2023

Also worth mentioning that it's not just a matter of speed & convenience, but also longevity of phone's NV memory.
They're mostly NAND based and sensitive to number of writes. So the less you write on them, the more they will last.

So maybe, provide it as an option that only does name checking, which must first be enabled in the settings while warning the user about its edge cases. For users like me who do music/photo/video syncing only one-way, this would be satisfactory enough.

Another potential way to do this would be to provide a differential view, where solely based on filenames, you get to see files that exist in a directory on PC but not on the phone on the left side, and vice versa on the right side of the screen. Possibly with a view of shared files at the bottom. This way, a single drag and drop from one side to the other would be conflict free :)

@ganeshrvel
Copy link
Owner

Thank you for the feedback. I currently have a lot on my plate.

I will try to find some time to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants