Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

I have no experience with PowerShell remoting. But first, you need to find out if your server does even support it.
ap69

Hi Martin

Thanks

Do you have any whitepaper on executing PowerShell remoting.

Just need a push to get started :)

The solution I'm looking for is to execute a Bat file that starts up a program, after upload, and imports data.

Thanks
martin

Re: Need to execute a program onthe FTP server after uploading files. Need Help

Some, but very few, FTP servers support SITE EXEC command. In the very rare case that your FTP server does support it, you can use:
call SITE EXEC my.exe

Though, in most cases, you cannot execute anything on the FTP server, if FTP is the only way you can access the server. You would have to use another method to execute the script, like SSH, PowerShell Remoting, etc.
ap69

Need to execute a program on the FTP server after uploading files. Need Help

Im executing the WinSCP from the ERP system and in the ftpup.txt I'm scripting the transfer.

How to execute a BAT OR EXE file in the script file?
P:\C5BMSQL\FTP\RS\FTP\WinSCP.com /script=P:\C5BMSQL\FTP\RS\FTP\ftpup.txt

option batch abort
option confirm off
option transfer binary
open ftp://XXX:XX
lcd "P:\C5BMSQL\FTP\RS\Export\"
 
cd "/MasterData/"
ls
rm "*.csv"
put "*Base*.csv"
 
cd "/OrderData/"
ls
rm "*.csv"
put "*OrderStatus*.csv"
 
# Want to execute a .Bat file og .Exe file here.
 
close
exit