Page 1 of 1

Shell command

Posted: Fri May 17, 2019 9:12 am
by matgarage
Hi
I'm using a command line tool to generate link for file on our ftp server.
The command line tool is part of commercial FTP server software and I'm using it to automate our workflow.

The command is in this form :
DropShip server_adress login password path_to_the_file_to_send
When I test it on Terminal (OS X) the result is the link i'm waiting for.

But when I'm trying to put it in livecode with this script :

Code: Select all

on mouseUp
   put "DropShip 192.168.10.100 login pass /Volumes/Jobs/MyFile_1905.pdf" into tempCom
   put shell(tempCom) into fld "Field1"
end mouseUp
The result in field1 is : "/bin/sh: line 1: DropShip: command not found"

Could someone help me to understand where is the problem ?

Re: Shell command

Posted: Fri May 17, 2019 10:05 am
by LCMark
@matgarage : The macOS Terminal has a different environment than that which you get from running an app from Finder (for example 'PATH' which defines where command line binaries are looked for is typically different). Try locating where the DropShip binary is and using the full path in shell (you could maybe make it a preference in your app, with a sensible, checked default).

Re: Shell command

Posted: Fri May 17, 2019 2:09 pm
by matgarage
Nice !
You're right, with the full path it's working perfectly now.

Thanks :)