Arc Forumnew | comments | leaders | submitlogin
A question about system calls
1 point by skenney26 6025 days ago | 1 comment
What is the correct way of calling something like "convert pic.jpg -flip pic2.jpg" from within Arc? I tried:

  (def flip (old new)
    (system:string "convert " old " -flip " new))
but I got a "command not found" error even though it works fine from the command line.


4 points by absz 6025 days ago | link

Try running (system "echo $PATH"); you probably don't have 'convert', in your path via system. If you specify the exact path (e.g. (system:string "/usr/local/bin/convert" old " -flip " new)), then it should work. Also, be careful about passing old or new in to system unmodified—quote and escape them, or you might run anything at all.

-----