Why can I not get WINSCP to run with a script?

Advertisement

Inkster jim
Joined:
Posts:
10

Why can I not get WINSCP to run with a script?

If this was my script, what command to I type to run it, I hace C:\program files\winSCP in my path and I type WinSCP filename to run it, but I get

D:\EARS_Extracts\ICR\Out>winSCP.com example.txt
Cannot start WinSCP application.

I have the IP and user names change to mine
WHY Can it NOT start WinSCP application? Is there a certain place the file is to be run from?

# Automatically answer all prompts negatively not to stall
# the script on errors
option batch on
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect using a password
# open user:password@example.com
# Connect
open user@example.com
# Change remote directory
cd /home/user
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get examplefile.txt d:\
# Disconnect
close
# Connect as a different user
open user2@example.com
# Change the remote directory
cd /home/user2
# Upload the file to current working directory
put d:\examplefile.txt
# Disconnect
close
# Exit WinSCP

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Why can I not get WINSCP to run with a script?

Do you have WinSCP.exe in the PATH? What happens if you type WinSCP.exe instead of WinSCP.com?

And btw, it is
WinSCP.com /script=example.txt
But that's not a cause of your problem.

Reply with quote

Inkster jim
Joined:
Posts:
10

Re: Why can I not get WINSCP to run with a script?

martin wrote:

Do you have WinSCP.exe in the PATH? What happens if you type WinSCP.exe instead of WinSCP.com?

And btw, it is
WinSCP.com /script=example.txt
But that's not a cause of your problem.

Prikyrl

You said "But that's not a cause of your problem"
Why do you think so?
Just to simplify things, can you give me a short script of what I need to put one file to the remote server?
AND the command line to run it?


Thank you!

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,392
Location:
Prague, Czechia

Re: Why can I not get WINSCP to run with a script?

There's nothing wrong about your script.

Can answer:
Do you have WinSCP.exe in the PATH? What happens if you type WinSCP.exe instead of WinSCP.com?

Reply with quote

Advertisement

You can post new topics in this forum