I'm a heavy user of Python scripts for admin tasks. I don't normally have a problem using these with Directory Opus, but today I wanted to direct the output of a Python script that takes a problematic zip file and extracts its contents to the destination directory.
It is failing, and I can't see why, even though the same script works fine from the command line. It therefore seems to be something about the way I have set up the custom button.
I have also tried things like: @set dest={destpath|Select destination folder} @output
"C:\Program Files\Python312\python.exe" "D:\W\30-39 Tools\32 Code projects\sjisunzip_python\sjisunzip.py" "{filepath}" "{$dest}"
...but I'm being hampered by my lack of experience with such commands. Also, at best I get a brief flash of the command line output before the window disappears.
Is there something obvious I should look at? In general terms, how should I approach debugging this sort of issue? Can I generate a message box or perform logging from within Dopus?
Thank you,
Dan
EDIT This is in 13.14, even though my profile strangely shows v9!
{filepath} and similar codes will have quotes added automatically, if the thing they’re inserting contains a space.
It's smart enough that "{filepath}" won't give you extra quotes, but also a good idea to make it explicit with @nofilenamequoting, like this (assuming you want quotes around both):
Thank you for that Leo, it was informative and a useful reminder of the breadth of Dopus' capabilities.
A few weeks ago I was in the attic and came across my original Amiga Directory Opus manual and discs, so my relationship with the software stretches back more than thirty years.
Despite that my daily use tends to be fairly pedestrian - lots of file copying and folder creation, custom buttons, renaming, that sort of thing. I should probably spend a bit of time exploring these features.