You are not logged in.
Hi Denis,
Renamer is a great program, I use it quite a bit. I've just downloaded v3.05, and love the new flexibility of being able to change the order of the rules.
I have a suggestion (actually 2) for a small change. That is, it doesn't seem possible to combine renaming using a text file and the rules - whenever I apply one it clears the other. Maybe that's just me doing it wrong, as this is the first time I've used the textfile option. But it would be quite handy to import names and then modify them in the usual way.
The second is whether any kind of a look up option be too complex to include. That is, selective replacement of text in the file name with text from a reference file.
Anyway, just my thoughts on ReNamer. Thanks again for a great program.
Offline
At the moment, text files and the rules can not be combined, since new names from the rules are always re-generated from the original name, while new names from the text file are only for 1 go.
There is a simple workaround for that: once you've loaded you new names from the text file - rename your files, so they store that name, and after that - you can use rules for manipulating with those names
Hmm... I dont really understand the second suggestion... can you explain it in more details please?
By the way, you will be able to do (virtually) anything with your filenames, with a new RascalScrept rule, which is coming soon
Offline
Hi Denis,
Yes, I see that in most cases the workaround would be fine. Although, if some of the new names in the text file were identical for whatever reason that would prevent that approach.
My second suggestion wasn't very important, but what I had in mind was the abitily to insert/replace text in the file depending on the content, with reference to an external table. E.g. if I had files containing the letters A, B & C, and a table relating each of those letters to some specific text, then I could replace and/or insert the text from the table depending on the original letter. I don't know if that's any clearer, but I'm not sure that it would have much use in general compared to the existing rules.
Offline
Good news
You wanted to "combine renaming using a text file and the rules", and here is the rule that will do that: PascalScript, enter a code below into its field:
var I: Integer;
begin
I := I + 1;
FileName := FileReadLine('C:\names.txt', I);
end.
This will create a rule, which will read lines from 'C:\names.txt' file (which you can change to your file), and place them as the new filenames! After that, you can add any other rules... Tell me how it works for you, ok? And don't forget to download the latest dev build: ReNamerBeta.zip
About your second suggestion... I'm a bit confused, tell me more...
Offline
I love this featured but I have a problem with the accented letters. à è ì ù ò are displayed (and renamed) with a question mark
Is possible solve this problem?
Offline
I love this featured but I have a problem with the accented letters. à è ì ù ò are displayed (and renamed) with a question mark
Is possible solve this problem?
FileReadLine is ANSI encoding plain text only.
https://www.den4b.com/wiki/ReNamer:Pasc … ad.2FWrite
function FileReadLine(const FileName: WideString; LineNum: Integer): String; Read a line from a file FileName specified by a line index LineNum.
function FileReadTextLines(const FileName: WideString): TWideStringArray; Read lines of text from a file, performing automatic text encoding handling. Added in v6.7.0.1 Beta.
Try this script instead (not tested)
var
I: Integer;
UnicodeLines: TWideStringArray;
Initialized: Boolean;
begin
if not Initialized then
begin
Initialized := True;
UnicodeLines := FileReadTextLines('C:\Temp\ReNamerNames.txt');
end;
FileName := UnicodeLines[I];
I := I + 1;
end.
http://www.den4b.com/wiki/ReNamer:Rules:PascalScript
HTH?
Script modified as explaint in posts below
Last edited by Stefan (2021-06-27 10:30)
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
Hi
Thanks, the script seems to work but there are 2 problems. The first is that when I add the files, a window pops up that says:
Preview process is terminated due to a critical error Line 14 out of range.
The second problem is that the program I use to generate the list doesn't write the extensions in the txt. So if possible your script should not modify the existing extension.
Thank you
Offline
Hi
Thanks, the script seems to work but there are 2 problems. The first is that when I add the files, a window pops up that says:
Preview process is terminated due to a critical error Line 14 out of range.
Be sure to have (at least) as many lines with text in your TXT file as you want to rename files.
The second problem is that the program I use to generate the list doesn't write the extensions in the txt. So if possible your script should not modify the existing extension.
Change
FileName := UnicodeLines[I];
to
FileName := UnicodeLines[I] + WideExtractFileExt(FileName);
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline
You are right but it is very strange. In the folder I have 13 flacs, the generated txt contains 13 titles BUT your script does not process the first title and starts from the second. For this there is the error.
I did a test with another folder but the problem is the same, the first title is ignored by your script. Very very strange
Offline
You are right, we have to start counting by 0.
Try changing
end;
I := I + 1;
FileName := UnicodeLines[I];
end.
to
end;
FileName := UnicodeLines[I];
I := I + 1;
end.
Read the *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)
Offline