Greetings Opi Fraternity
I seek some high level opinion here.
History and Function
I have a script which I rely on ALOT and has worked well for some time - multiple years actually.
With a set of files selected when invoked it
- Generates a popup dialog to grab some information;
- Optional - Add a suffix to the files
- Moves the files to a new location
- Optional - The move will be in a new subfolder created in the new location
Existing/Old Method
The way the script does this is by generating s list of internal commands and then executing them using the Command scripting object and specifically the command.addline and command.Run methods.
Disaster
All was fantastic unitl this script started breaking.
I first noticed this I think early 2022.
I believe this is associated with issues I sought help with here and I see others are suffering with what I think may be similar of the same issues here
Options to Address
As I see them they are
Option 1 - Troubleshoot/Fix underlying Windows issue - This I gave up on some time ago. Too hard. Symptoms changing, intermittent. No handle on things at all.
Option 2 - Rewrite my script so that the actions are carried out in one rename command. See discussion below
Option 3 - Rewrite the script so that the copy move is actioned first and then the renaming actioned once the files are in the new location
Option 2 use a single rename command
I have made considerable progress here which means basically @Ixp has written up the required rename IC syntax for me. However there is one outstanding and we speak and I am totally reliant on him to get this working. Also at least one command form which I had tested as working I have got to fail. There is a bug that @Ixp has identified and the banter here between him and @Leo here suggests that the symptoms are intermittent.
So I am worried that this is a thread of effort that I am using up kind talented people's valuable time and I don't know if my lack of comprehension of cause and effect is down to bugs or my own ignorance etc. I have not gained confidence and understanding as I might have expected of the rename command and of how the external control codes can be applied.
And so my mind goes to.....
Option 3 - Copy move then rename files in new location
I am turning over this a bit in my mind now as I am worried that Option 2 above is not going to come to fruition.
Summary
Thoughts? Advice? Any comments appreciated!
I don't mind doing the hard yards but I want if possible to go in the right direction at the outset if that makes any sense.......