I'm using this code to run command line utility to work on images (/utils is my folder alias):
/utils/ImageMagick/convert -border "20" -bordercolor "#FFF" -gravity center +append {allfile$} output.png
It works fine in all cases when entered in command field (CLI QUICKCMD). But when I use file type dialog to set up a context menu to run this command on selected images, I get this error (I use @leavedoswindowopen to see the error):
The system cannot find the path specified.
convert: UnableToOpenBlob '2018-01-08 15.06.16.jpg': No such file or directory @ error/blob.c/OpenBlob/3323.
convert: UnableToOpenBlob '2018-01-08 15.20.19.jpg': No such file or directory @ error/blob.c/OpenBlob/3323.
convert: NoImagesDefined `output.png' @ error/convert.c/ConvertImageCommand/3275.
This happens only when the path (folder name) contains non-ASCII characters, like ółż (ASCII-only folder names work ok) and only when invoked by context menu (command bar works ok).
Why is there even a difference between those two methods and how can I fix this?
That's weird but now I came home and on my home computer the same command works fine from context menu.
Folder name is the same. File names and files contents are the same. Command is the same. DOpus version is the same. Windows version is different (7 Pro at home and 10 at work).
Any ideas? Is there a way to see the exact command that was passed to the exe file?
Now I tried it at work and am still having issues.
Params are the same. I think there's something wrong with paths. I tried adding cd cd {sourcepath$} but no luck.
When the command is finished, current dir in dos window is c:\windows\system32, instead of the one that was used as source. Is that normal?
I tried to switch to paths instead of file names /utils/ImageMagick/convert -border "20" -bordercolor "#FFF" -gravity center +append {allfilepath$} output.png but now I'm getting this error:
The system cannot find the path specified.
convert: UnableToOpenBlob 'C:\Users\[...]\a ólz\2018-01-08 15.20.19.jpg': No such file or directory @ error/blob.c/OpenBlob/3323.
convert: UnableToOpenBlob 'C:\Users\[...]\a ólz\2018-01-08 15.06.16.jpg': No such file or directory @ error/blob.c/OpenBlob/3323.
convert: NoImagesDefined `output.png' @ error/convert.c/ConvertImageCommand/3275.
Note that polish letters are changed to some weird chars.
Path provided by {allfilepath} is correct (when using dopus script, not ms-dos) but it seems that if the current working dir contains polish chars, image magick gets it incorrect so it doesn't work anyway. But I found a solution that for now seems to work:
first, change current dir to something that doesn't contain polish chars, and then pass full paths for both, input files and output file:
cd \
/utils/ImageMagick/convert -border "20" -bordercolor "#FFF" -gravity center +append {allfilepath$} {sourcepath$}/output.png