Page 1 of 1

ExecuteCommand on SFTP file transfer

Posted: Tue Sep 19, 2017 8:21 am
by fleaster
Ok, am tearing out my hair on this one (not that I had much in the first place!) - am trying to trigger an SFTP file transfer via TI, but it does not appear to be working.

Code: Select all

Command1 = 'cmd /c scp2 \\APAUSXXXX\TM1\TempTest\TEST_SFTP_170919-1010.txt ufbXXXX@XXXXX1012.apac.XXXXXXXX.net:/var/app/XXXXXXXXXXXX/apac/uat1/AU/ODS/TEST_SFTP_170919-1010.txt' ;

ExecuteCommand(Command1, 1);
Considerations:
1. the command line works perfectly when executed from the server in DOS
2. similarly a .bat file with this command line works perfectly on the server
3. when the same command line is executed using TI, nothing happens
4. when the same .bat file is executed using TI, nothing happens
5. tested a simple DOS copy function executed from TI, and it works fine

...what other factors should I test? any ideas what the issue could be? :)

thanks!

Matt

Re: ExecuteCommand on SFTP file transfer

Posted: Tue Sep 19, 2017 8:43 am
by AmbPin
Does the account that the TM1 service is running as have all necessary permissions?
Yo could test this by right-click and run-as on your BAT file using the TM1 service account credentials.

Re: ExecuteCommand on SFTP file transfer

Posted: Tue Sep 19, 2017 12:46 pm
by Drg
1. Run service as user with same premission
2. cmdd= 'cmd /c " YOUR COMMAND HERE "';
3. Maybe need use powershell ????

Re: ExecuteCommand on SFTP file transfer

Posted: Tue Sep 19, 2017 11:24 pm
by fleaster
Thanks for the responses... yes, I have run it via direct logon to the server and it works perfectly... might have a look into Powershell, otherwise am not sure what else can be tried :(

M.

Re: ExecuteCommand on SFTP file transfer

Posted: Mon Sep 25, 2017 8:06 am
by Drg
fleaster wrote: Tue Sep 19, 2017 11:24 pm Thanks for the responses... yes, I have run it via direct logon to the server and it works perfectly... might have a look into Powershell, otherwise am not sure what else can be tried :(

M.
Use double quotes!!!

Re: ExecuteCommand on SFTP file transfer

Posted: Fri Sep 29, 2017 12:51 pm
by dr.nybble
Process Monitor can be a helpful tool to diagnose what is going on as well (https://docs.microsoft.com/en-us/sysint ... ds/procmon)