For years I've been using a script that moves all files in a folder to their parent folder and removes the empty folder. Since I've upgraded to version 13 this script or at least the 'CollapseFolder' and 'CollapseFolder Remove' option stopped working.
Did something change in V13 that I'm unaware of and prevents certain scripts from executing or could it be a bug?
I have no idea how to further investigate this issue, So hopefully someone knows how to fix this or point me in the right direction. I'm also open to other methods that accomplish the same result.
Are you seeing that with 13.2? There were some issues with cmd.SetModifier in the early beta versions but those were all fixed before 13.1 and 13.2, at least to my knowledge.
Can't see anything obvious in the script that would break under 13. @wowbagger, do you have any ideas?
I'm still unable to use this script with Version 13 (currently on 13.5.1b). I Tried it on another system and the script works fine on V12, but after updating to V13 it stops working. After some further investigation it seems that it's only the 'Collapse folder' and 'Collapse folder and remove' part of the script that isn't functioning in V13.
I found two alternative solutions on the forum, but they both require me to enter te folder and select the files. What I'm looking for is something that does the same as this script does. e.g.: Select the folder, pull the files from that folder into the current one and delete the selected folder, without having to enter the folder and select the files.
Does someone know another wat to achieve this with the current version of Directory Opus?
Or is there maybe someone who can point in the right direction on how to debug this script?
Sets the command's destination to the specified path. You can provide the path as either a string or a Path object. Calling this method clears the destination tab property from the command.
Scripting: The HERE argument does not work when running commands via the scripting Command object. Instead, use cmd.SetDestTab(cmd.sourcetab) on the Command object, or use an explicit TO argument in the command string.
I did some more testing and it seems to work without any problems now.
Unfortunately I can't tell you why it works. Maybe because it uses a 'runcommand' to execute the copy command? My knowledge on this topic is severely limited.
I did change the code to cmd.RunCommand("Copy MOVE * TO={sourcepath$}");
This also works and using TO={sourcepath$} seems to be safer then using HERE according to the manual.
Thanks again for your help. I would have never figured this out on my own.