Hey,
I'm using DOpus for several years now and have written some Renaming-Scripts already. But so far I could not solve one issue:
When I mark several files in one folder and I have a second folder with exact the same files - just a differnt ending - How can I do the same operation on BOTH files?
Here is my example:
After the first step of sorting, I have a structure like this:
Photos
|- 2019-08-30
| |-JPG
| | |-file1.jpg
| | |-file2.jpg
| | |-file3.jpg
| | |-file4.jpg
| |-RAW
| | |-file1.cr2
| | |-file2.cr2
| | |-file3.cr2
| | |-file4.cr2
Now I mark two files in Folder "JPG" - let's say file2.jpg and file3.jpg and start my script:
@useactivelister
@set event={dlgstring|Enter Event name}
Rename FILEINFO FROM "..\RAW\{file|noext}.CR2" TO "..\..\{shootingtime|D#yyyy-MM-dd} {$event}\RAW\{file|noext}.CR2"
Rename FILEINFO TO "..\..\{shootingtime|D#yyyy-MM-dd} {$event}\JPG\{file}"
It takes the files, asks for an Event-Name and creates a new folder one level up and also creates JPG and RAW as subfolders. It then takes the JPG-Files and moves them them to the new folder\JPG. So far everything works fine. But I would like to also move the cooresponding RAW-Files to the new folder\RAW. Here, my script fails for whatever reason after the first file.
Expected:
Photos
|- 2019-08-30
| |-JPG
| | |-file1.jpg
| | |-file4.jpg
| |-RAW
| | |-file1.cr2
| | |-file4.cr2
|- 2019-08-30 My Event
| |-JPG
| | |-file2.jpg
| | |-file3.jpg
| |-RAW
| | |-file2.cr2
| | |-file3.cr2
Is:
|- 2019-08-30
| |-JPG
| | |-file1.jpg
| | |-file4.jpg
| |-RAW
| | |-file1.cr2
| | |-file3.cr2
| | |-file4.cr2
|- 2019-08-30 My Event
| |-JPG
| | |-file2.jpg
| | |-file3.jpg
| |-RAW
| | |-file2.cr2
So why does my script work correctly for all JPG-Files, but only for the first CR2-file? If I would have an issue in my {file}->{file|noext}.CR2 conversions, why is it working for the first file then and not for every other file?
As I'm dealing with thousands of pictures a year, your hints could help me to save so much time and eliminate one of my major error-sources.
Thanks and with best regards
Oliver