Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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

Guest

Thank you so much! Works flawlessly! I really appreciate all of your assistance!
martin

Sorry, I've totally forgot that you cannot combine URL-like session parameter with the /command parameter. See documentation for more details. But you can do:
winscp3.com /command "open scp://user1:password1@myhost.com/pub/data" "put file1.txt"
HelpMe!

Here's the output,

C:\Temp>winscp3.com scp://user1:password1@myhost.com/pub/data /command "put file1.txt"
Initialisation...
Searching for host...
Connecting to host...
Authenticating...
Using username "user1".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] user1@myhost.com
winscp>

It does work with if I create a "script.txt" file that contains put C:\file1.txt. However, I would prefer not to do that since I'm trying to run this command from within a PERL script.
martin

Can you post an output of the command on console?

Also,
would it work, if you use:
winscp3 scp://myusername:mypassword@myhostname/myremotepath /script=script.txt
and script.txt contains
put c:\myfile.dat
?
HelpMe!

Thanks for replying prikryl. I currently have "Version 3.8.2 (Build 330)" installed on a Windows XP machine.
martin

Re: Does "/command" work from a command-prompt in Windows???

What version of WinSCP are you using?
HelpMe!

Does "/command" work from a command-prompt in Windows???

OK, so I run the following from a command-prompt,

winscp3 scp://myusername:mypassword@myhostname/myremotepath /command "put c:\myfile.dat"

It connects to the "myhostname" just fine, but it doesn't copy the "myfile.dat" file to the host. I do not want to create a script for such a simple task. Any ideas why I can't get it to copy the file?

Thanks.