You are not logged in.
Pages: 1
Hello. I need some clarification.
In Rule -> Serialize there is a option "unique if possible". What does it mean? Will it maintain its uniqueness between sessions?
I need to create unique and random alphanumeric file names. After I rename them I will transfer them to DVD. Every file that I create must have unique file names to avoid collisions even in several DVDs.
Thank you very much.
Offline
If you do Random Serialization, you have to specify the length of the number that will be generated. Imagine you have added 100 files, but you set the length of the random number to be 1 digit... do you see what I mean by "unique if possible" now? There can only be 10 unique numbers with length of 1 digit (from 0 to 9), so ReNamer will not even bother generating unique numbers because it will be impossible for 100 files.
Unique numbers are valid only for the current preview, but not for the entire session. You might need to use PascalScript for that purpose, storing used numbers in some text file...
Offline
Thank you for your explanation.
I'm not a developer, and I don't know how I could do that in PascalScript. I supose that storing the names is a text file wouldn't be efficient.
Perhaps a better alternative would be calculate the hash (md5 maybe) and then rename the file with it.
Could you share your thoughts on this.
Thanks.
Offline
Yeap, MD5 or SHA1 would a perfect solution! ReNamer supports both of them as meta tags, but it could take a while to generate them for large files. I would go for it if processing time wouldn't be a problem. Note: if you do go for MD5 or SHA1 - don't forget to use "Real-time update of preview" option from the settings, otherwise ReNamer will freeze until all of the files a processed.
Alternatively, you could put a current time stamp into the filename: "yyyymmddhhnnsszzz", yyyy=year, mm=month, dd=day, hh=hour, nn=minutes, ss=seconds, zzz=milliseconds. And pause after each file for about 100 milliseconds. So you will get something like this:
20071015144145000
20071015144145100
20071015144145200
That is for 15-October-2007 14:41:45, and milliseconds increasing by ~100. To make it look nicer you could insert "-":
2007-10-15-14-41-45-000
2007-10-15-14-41-45-100
2007-10-15-14-41-45-200
Using this method, you just have to make sure that you dont go "back in time"
Tell me what you think... I can write that script for you if you need...
Offline
Using this procedure does exactly what I wanted.
First: "Add Rule" -> "Delete" -> From, Position 1 - Until, Till the end
Then: "Add Rule" -> "Insert" -> What (choose the lightning icon and choose "Hash SHA1")
This will delete the existing and then add the hash as the new name.
I never realized that I could do that. It wasn't obvious for me until you told me. Thank you very much.
You've made a great program.
Offline
Hi guys!
First of all thanks for the excellent peace of software you made.
Im am needing to use the software for renaming images in different computers and i need to ensure they are unique and random.
I think the best way is the method of renaming based on current time to milisecons because the Hash is too long..
Can you please send me the pascal script you mentioned, to execute this task?
Thank you very much in advance.
Offline
To get you started, you can use the following pascal script.
It replaces the current name with the current date and time with milliseconds. It also pauses for 1 millisecond between the files to ensure that names don't clash.
const
FMT = 'yyyymmdd.hhnnss.zzz';
begin
FileName := FormatDateTime(FMT, Now) + WideExtractFileExt(FileName);
Sleep(1);
end.
It may be better to add incremental serialization rule instead of pause for 1 millisecond between files.
P.S. This topic is quite old (2006), next time please create a new topic.
Offline
Pages: 1