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

elch

Re: Solution found

Hello prikryl,

thank you for your reply AND thank you very much for programming WinSCP !!!

It helps a lot!
martin

Re: Solution found

Actually you should do:
C:\Programme\WinSCP\WinSCP.exe /console "option batch on" "option confirm off" "open -privatekey=""C:\putty-key_ssh-2_rsa.ppk"" User@123.123.123.123:21" "cd /OUT/"

But your solution will work as well.
elch

Solution found

Hello,

after trying several hours I found out, that I have to place the privatekey command before the open command.

C:\Programme\WinSCP\WinSCP.exe /console /privatekey="C:\putty-key_ssh-2_rsa.ppk" /command "option batch on" "option confirm off" "open User@123.123.123.123:21" "cd /OUT/"

:D :D :D
elch

Changing Directory dont work

Hello,

i have this command line:
C:\Programme\WinSCP\WinSCP.exe /console /command "option batch on" "option confirm off" "open User@123.123.123.123:21" /privatekey="I:\projects\putty-key_ssh-2_rsa.ppk" "cd /OUT/"

Everything works fine, but the command for directory changing ("cd /OUT/") does not work (i tried many combinations: with/without quotes etc...). If I shell the command line it logs onto the server and just ignores the cd /OUT/. If I type cd /OUT/ manually, it works fine.

It seems, that every command after the privatekey-command gets ignored (for example: exit).

Can somebody please help to fix my syntax problem? Version is up to date: 4.2.9

Thank you very much!