Topic "Changing Directory dont work"

Author Message
elch

Guest


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!
Advertisements
elch

Guest


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/"

Very Happy Very Happy Very Happy
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
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.
_________________
Martin Prikryl
elch

Guest


Hello prikryl,

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

It helps a lot!
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