Firstly I 'm trying to figure this whole process out. To hopefully understand it.
What I am trying to do is use a scanner to rename files.
So when I scan it I need the EAN to rename the selected file but if I have scanned it before I need it to add _2 and somehow if 5xxxxxxxxxxxx_2 exists then make it _3.
What i was first trying to do is add the scanned string to the variable so it can compare the previous scanned item.
This is the reg expressions that I am using \b503\d.*\r
I've almost got it working as I would like.
The only issue I have is that where I manually select the file (highlight) this may then not be the file that gets renamed.
For example if you have the files
If I select 3.jpg then scan, the first interaction from the scanner begins with the number 5 and therefore will jump to file 5.jpg, and then this one gets renamed.
I would need it to remember the trigger value but not let it input to the finder?
so that the originally selected file remains selected