Jump to content

run program within autoit


Recommended Posts

Hello all

I need to replace some sftp related code in a autoit with winscp.cmd.

Thus I've made sure that the filetransfer is running well on the commandline in Windows 7.

Spoiler

C:\Program Files (x86)\path\winscp\winscp.com /privatekey="C:\Program Files (x86)\path\winscp\ftp_ppk.ppk" user@host:/data_in /script="c:\Program Files (x86)\path\winscp\scp_script.txt"

 

put above code in my autoit file will always fail for some reason.

Spoiler

Run('"C:\Program Files (x86)\path\winscp\winscp.com" /privatkey="C:\Program Files (x86)\path\winscp\ftp_ppk_mm.ppk" "user@host:/data_in" /script="c:\Program Files (x86)\path\winscp\scp_script.txt"'

 

Any idea what I've made wrong?

thanks in advance  for some advice / help on this.

 

--thork

Link to comment
Share on other sites

Hello all

I need to replace some sftp related code in a autoit with winscp.cmd.

Thus I've made sure that the filetransfer is running well on the commandline in Windows 7.

Spoiler

C:\Program Files (x86)\path\winscp\winscp.com /privatekey="C:\Program Files (x86)\path\winscp\ftp_ppk.ppk" user@host:/data_in /script="c:\Program Files (x86)\path\winscp\scp_script.txt"

 

modified code in my autoit file will always fail for some reason.

Spoiler

Run('"C:\Program Files (x86)\path\winscp\winscp.com" /privatkey="C:\Program Files (x86)\path\winscp\ftp_ppk_mm.ppk" "user@host:/data_in" /script="c:\Program Files (x86)\path\winscp\scp_script.txt"'

 

Any idea what I've made wrong?

thanks in advance  for some advice / help on this.

 

--thork

Edited by thorkfumble
Link to comment
Share on other sites

  • Developers

What happens when you run it this way? A CMD window will open and remain open for you to read any error in case there is any:

Run(@ComSpec & ' /k "C:\Program Files (x86)\path\winscp\winscp.com" /privatkey="C:\Program Files (x86)\path\winscp\ftp_ppk_mm.ppk" "user@host:/data_in" /script="c:\Program Files (x86)\path\winscp\scp_script.txt"')

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Just type the reply at the bottom and hit Submit reply when you want to reply to a post as the Report button is for something totally different. ;)

 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Try this version please:

Run(@ComSpec & ' /k ""C:\Program Files (x86)\path\winscp\winscp.com" /privatkey="C:\Program Files (x86)\path\winscp\ftp_ppk_mm.ppk" "user@host:/data_in" /script="c:\Program Files (x86)\path\winscp\scp_script.txt""')

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...