Check files between drives with different directory structure

Get help for specific problems
Posts: 5
Joined: 8 Apr 2024

alobo

Consider the situation in which I copy files from one disk (eg an SD card) to a given directory, eg. /home/pepa/dir1, but, later, subdirectories were created in dir1, and many files were moved to those subdirectories.
After a while, I want to clean the SD, but I would like to make sure first that all files in the SD actually exist on dir1 or in any of its subdirectories. Can I use FreeFileSync to check that all files in the SD actually exist in dir1 or in any of its subdirectories?
User avatar
Posts: 2287
Joined: 22 Aug 2012

Plerry

If the directory structure in your dir1 is (completely) different from that on your SD card, then FreeFileSync seems to not be the tool for your job.
Posts: 5
Joined: 8 Apr 2024

alobo

I am a FreeFileSync user, and I understand that this is not really a sync problem, but a common problem for FreeFileSync users, which might not be difficult to solve through options in the Configuration or, perhaps, a dedicated tool. Or perhaps you can suggest an existing tool. All I have been able to find is
https://stackoverflow.com/questions/75704712/find-files-that-have-not-been-copied-from-one-directory-to-another-file-tree
but all these solutions are very slow.
Posts: 4
Joined: 5 Apr 2024

TomBoy321

I agree that FFS was many of the underlying abilities to make this happen, but as dedicated utilities already exist that will fulfil this use case I think it's unlikely the author will add any such functionality, especially considering the additional confusion and compilation it would add.

alobo, I suggest you use any one of the many great duplicate file removing utilities available. Being an FFS user, you should easily be able to understand how such a utility with a directory given keep priority would solve your issue. But I can explain if you want.

The two that recommend offhand are https://github.com/qarmin/czkawka & https://www.duplicatecleaner.com/
Posts: 5
Joined: 8 Apr 2024

alobo

Thanks. I have contacted the author of czkawka, because what I would need is to search dor not-duplicated, rather than duplicated.
Posts: 4
Joined: 5 Apr 2024

TomBoy321

Last time I used one of those utilities, I was able to give a directory (e.g. an SD card) a path that the program would sort in such a way that I could select all duplicate files on it (this was by alphanumeric sorting), therefor deleting/cleaning all files I previously sorted on my PC/backups, and the only files left on the SD cards are ones I need to deal with. Is that not what you want, alobo?
Posts: 5
Joined: 8 Apr 2024

alobo

The files in the SD should be duplicated somewhere in the disk. What I want to verify is that all files in the SD exist in the disk. I can eliminate those duplicated files from the SD, but see https://github.com/qarmin/czkawka/issues/1265