ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Finished Programs

DONE: Sync folders by renaming files

(1/6) > >>

DyNama:
Hi, gang,
When i download photos and videos from my camera, i move them off the sd card, and then immediately back them up to an external hard drive. eventually i rename the original photos with notes about the contents. the problem i'd like to solve is that the backup copies did not get the new name. i don't want to recopy them, that could take too long, i just want to match the files by size, date & time, and extention, none of which will change (i don't think i need checksum comparison), and put the new name on them.

[attachimg=#1][/attachimg]

I can actually match them manually by just sorting by size, which i've done in the file browser in the photo above. (isn't it amazing that no two photos or videos are exactly the same size!) now all i need is to copy each filename to the clipboard 1-at-a-time in the right panel, then apply the new name to the matching file in the left panel. but with dozens if not hundreds of files, that's a lot of work. i'd like an easier way to do that, please.

My thinking is a duplicate finder that offers to apply 1 filename to the other (in addition to deleting one, which i won't use, but that's what dupe finders usually offer to do), a file-syncing program that recognizes duplicate files, a program that shows the files that match together with a rename button or a checkbox and a Rename Selected button, a program that pops up a window for each match and offers to rename the right file to match the left or vice versa, a dual-pane explorer just like the above pic where i highlight the 2 files and press a button, whatever is easier.

4wd:
NOTE: Latest version down there.

If your only matching criteria is size then this should do what you want.

Save it as RenSS.cmd and then at a command prompt type RenSS.cmd <source> <dest> - put quote around things with spaces in.

It'll only do *.jpg, (unless you change the appropriate parameter), and it's recursive - so if your destination is a sub-directory of your source then you're in deep shit.


--- Code: Text [email protected] offrem RenSS.cmdrem Rename files in dest with same size as files in sourceremrem RenSS.cmd <srce> <dest> setlocal EnableExtensions for /r %1 %%a in (*.jpg) do (call :CheckB "%~2" %%~za "%%~nxa")goto End :CheckBfor /r %1 %%b in (*.jpg) do (if %2 equ %%~zb ren "%%b" "%~3")goto :EOF :End
So using your example above:

RenSS.cmd "C:\Users\Norm\Documents\My Pictures XP\Vacation 2012" "O:\DyNama Collection 2\Pix - not backed up\Vacation 2012 Backup"

Yes, I know, it's not as easy as clicking buttons, (see V3 below), but then most people would use a dual pane filemanager and just do something like RenSS.cmd %s %d

NOTE: Worked here on my small test scenario but who knows what might happen on your machine, ie. test it first on some duplicated files.

If there happens to be more than two files with the same size then subsequent rename operations for them will fail after the first, (ie. file already exists).

cmpm:
I was thinking to suggest a sync program.
Or a cloud app like dropbox or box.

app103:
Perhaps one of those duplicate file finders, but one that can rename the duplicates, rather than delete them?

skwire:
As an aside, I think basing the rename off of file sizes is just asking for trouble since the chance of a collision does exist, however small.  On any modern computer, generating any kind of checksum for such small files wouldn't be much of a price to pay to better guard against collisions.

Navigation

[0] Message Index

[#] Next page

Go to full version