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

Author Message
Inkster jim
[View user's profile]

Joined: 2011-05-23
Posts: 11
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
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
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.
_________________
Martin Prikryl
Inkster jim
[View user's profile]

Joined: 2011-05-23
Posts: 11
prikryl 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!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
There's nothing wrong about your script.

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

_________________
Martin Prikryl
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License