BUG with CSV tags

Advanced Renamer forum
#1 : 03/06-20 17:18
Oks
Oks
Posts: 4
Hello,

I have a folder of files which need to be translated. All files share 4 words in their file name that should be translated from french to english. They also contain other words but they should be left alone. I use - as separator.

So, I have set a csv file with column 1 (english) and column 2 (french)

I have 4 lines in this csv file to translate the 4 words. English to french :

Word 1 -> Mot 1
Word 2 -> Mot 2
Word 3 -> Mot 3
Word 4 -> Mot 4

Total of files in my folder is 10. They all have the 4 words that need to be translated in their file names

When I use the replace method with <Csv:1> and <Csv:2>, this is what happens :

First file in the list has word 1 replaced to the french translation (Mot 1)
Second file in the list has word 2 replaced to the french translation (Mot 2)
Second file in the list has word 3 replaced to the french translation (Mot 3)
Second file in the list has word 4 replaced to the french translation (Mot 4)

BUT all the other words remain unchanged, they do not get replaced, also, after the 4th file, no other file gets replaced...

So for example, this results with this

Word1-Word2-Word3-Word4.jpg -> Mot1-Word2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg -> Word1-Mot2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg -> Word1-Word2-Mot3-Word4.jpg
Word1-Word2-Word3-Word4.jpg -> Word1-Word2-Word3-Mot4.jpg
From the 4th file, all other files remain unchanged... until the 10th file (total file in the folder)
Word1-Word2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg
Word1-Word2-Word3-Word4.jpg

How can I make Advanced Renamer replace all occurences ? It seems like it scans the csv line by line and do not process the whole list to replace everything at the same time!

Any advice or fix?

Note: I can't use pattern replace because words are actually shuffled randomly in file names and same behavior with "list replace" method

Thank you for reading me!




03/06-20 17:18 - edited 03/06-20 18:10
#2 : 03/06-20 18:58
David Lee
David Lee
Posts: 473
You are misunderstanding "Data from CSV import". Each line of the csv file contains a set of metadata that corresponds to the corresponding entry in the Filename list. Since you have only entered 4 lines in the csv file only the first 4 files will be renamed because <Csv:1> will be a null string for all other files.

You should use the List replace method.
Add 4 lines...

Word1 -> Mot1
Word2 -> Mot2
Word3 -> Mot3
Word4 -> Mot4



03/06-20 18:58 - edited 03/06-20 19:15
#3 : 03/06-20 19:22
Oks
Oks
Posts: 4
Reply to #2:
Thank you for helping,

I figured out that list replace does it, but I do have a list of thousands of words translated and this tiny box does not give a lot of flexibility, and it is only readable by Advanced Renamer. Also, adding them manually in Advanced Renamer would take weeks full time...

I would love to be able to create a custom .csv file with a huge list of replaces, import it, and have the same behavior as "List replace", but using data from a .csv!

A useful future feature I guess unless there is a custom script that could do this?


03/06-20 19:22 - edited 03/06-20 19:24
#4 : 03/06-20 19:57
Oks
Oks
Posts: 4
Reply to #3:
I found a way to convert my csv file to an inline data so I can paste it in the .aren preset file, it works!

Do you know if there is a limit in the number of entries in "list rename" method? Is it unlimited?


03/06-20 19:57
#5 : 04/06-20 08:41
David Lee
David Lee
Posts: 473
Reply to #4:
I can't find any information about the maximum number of List replace entries. I suggest you ask the developer - Kim Jensen - kj@hulubulu.dk

I did notice that the replace and replacewith entries are simple strings separated by "$?$13$:$$?$10$:$" in a .aren file and thought about the possibility of generating them outside Advanced Renamer.

How are you converting your csv file to the "inline data" - Excel macro perhaps?

In the past I have used a script to make multiple replacements, generating lines of code automatically from data in a csv file using Excel.

Example in www.advancedrenamer.com/forum_thread?forum_id=10060


04/06-20 08:41 - edited 04/06-20 09:17
#6 : 04/06-20 12:51
Oks
Oks
Posts: 4
Reply to #5:

Hello,

My method is quite prehistoric I would say, I do it manually, but it works!

I copy all the data from column 1 in my .CSV file

Past it in an word document, replace this character ^l (it's a hidden character for soft / shift + enter return) by $?$13$:$$?$10$:$

Then copy the inline text to the .aren file

Do the same for column 2 and you're done!


04/06-20 12:51 - edited 04/06-20 12:52