Start renaming list only under certain conditions
I have a long list of methods.
These should only be processed if certain conditions are fulfilled.
Is this possible?
These should only be processed if certain conditions are fulfilled.
Is this possible?
Insufficient information!
The provisional answer is probably - if you use a script.
The provisional answer is probably - if you use a script.
Reply to #2:
Hi, sorry - here some information.
I've downloaded some files.
Filename ist e.g. JAHRESSTEUERBESCHEINIGUNG_1234567890_dat20201231_id123456789.pdf
After Advanced Renamer did his job, the filename is 2020-12-31 JAHRESSTEUERBESCHEINIGUNG 1234567890.pdf
In the method list there are 34 methods.
Advanced Renamer was triggerd by a periodic program and after the second run the filename is
1234567890 2020-12-31 JAHRESSTEUERBESCHEINIGUNG.pdf
I want to check at the beginning of the methodlist, if there are "_" in the filename. If not, do nothing.
Is it possible to use as first method a script to check for "_"?
Hi, sorry - here some information.
I've downloaded some files.
Filename ist e.g. JAHRESSTEUERBESCHEINIGUNG_1234567890_dat20201231_id123456789.pdf
After Advanced Renamer did his job, the filename is 2020-12-31 JAHRESSTEUERBESCHEINIGUNG 1234567890.pdf
In the method list there are 34 methods.
Advanced Renamer was triggerd by a periodic program and after the second run the filename is
1234567890 2020-12-31 JAHRESSTEUERBESCHEINIGUNG.pdf
I want to check at the beginning of the methodlist, if there are "_" in the filename. If not, do nothing.
Is it possible to use as first method a script to check for "_"?
Reply to #3:
It will be easiest to put the Script method at the end of the batch and revert the flename back to its original value where the original name began with "_"
ie:
if (item.name[0] == '_') return item.name;
It will be easiest to put the Script method at the end of the batch and revert the flename back to its original value where the original name began with "_"
ie:
if (item.name[0] == '_') return item.name;
Reply to #4:
Sorry - I misread your specification.
To revert filenames originally containing "_" you need:
if (item.name.includes('_')) return item.name;
Sorry - I misread your specification.
To revert filenames originally containing "_" you need:
if (item.name.includes('_')) return item.name;