Renamer and Unique Number

Started by P.Jones, July 26, 2014, 02:35:36 PM

Previous topic - Next topic

P.Jones

I'm setting up a simple Renamer Preset

Date YYMMDD Format
Text = _{File.Name|substrr:0,4}
Unique Number (to prevent duplicate file names) = Mininmum width: 1 digits, prefix: _
Copy File = P:\Imported Camera Files\Imported TZ5 Files

Original file = G:\DCIM\104_PANA\P1234567.jpg

Renamed file = P:\Imported Camera Files\Imported TZ5 Files\140726_4567.jpg

If renamed file already exists in new folder Renamed file should be = P:\Imported Camera Files\Imported TZ5 Files\140726_4567_1.jpg, but I keep getting error message

Error: Failed to copy. A file with this name already exists.

The Result box show the copy name as = P:\Imported Camera Files\Imported TZ5 Files\140726_4567.jpg


Any ideas

Mario

The Renamer checks for existing files in the file system. But if you are using a Copy Step (I interpret what you wrote that way), and the folder to which you copy the file has already a file with the same name, the Renamer will fail and issue the error message. The Renamer only checks for duplicates in the designated output folder, but not in target folders you may use in an additional Copy step.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

P.Jones

Quote from: Mario on July 26, 2014, 07:13:21 PM
The Renamer checks for existing files in the file system. But if you are using a Copy Step (I interpret what you wrote that way), and the folder to which you copy the file has already a file with the same name, the Renamer will fail and issue the error message. The Renamer only checks for duplicates in the designated output folder, but not in target folders you may use in an additional Copy step.

Hi Mario

I just tried the this again using the 'Default' renamer preset

Original file name

Unique Number (to prevent duplicate file names) = Mininmum width: 1 digits, prefix: _

Selected 1 file 12345.jpg ran the renamer and nothing happens, I don't get a new file like 12345_1.jpg

Mario

Rename two files at least so you get a duplicate name. Then the renamer will add the number to ensure uniqueness. This is only added when there is a dupe.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

P.Jones

Quote from: Mario on July 30, 2014, 03:56:19 PM
Rename two files at least so you get a duplicate name. Then the renamer will add the number to ensure uniqueness. This is only added when there is a dupe.

Well I tried and after several attempts I got it to work, but only by renaming every file to the same file name, great if you want to rename loads of photos to the same file name except for the Unique file number on the end.

Will do a feature request for the Renamer to check for duplicates in the designated target folder for use with the Copy and Move options as I can see this would be of greater value than the way it works at the moment.

Mario

Copy and Move steps are not that often used. And duplicate file names are far more often encountered than you express in your post. Many users rename files based on date and time, and this often produces duplicate file names, which are then neatly resolved with the unique number.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook