Topic "passing password in command line?"

Author Message
InGearX

Guest


I have the following batch.bat file:

Code:
start winscp380.exe sftp://user51:12#$56&*@wwwstage.nydc.site2.prv:22/usr/local/www/staging/


And as you might imagine the password fails to pass :'(

I tried using variables in batch but it fails
Code:
set pass="12#$56"
start winscp380.exe sftp://user51:%pass%@wwwstage.nydc.site2.prv:22/usr/local/www/staging/


1) Is there any way for me to actually pass the password?

2) Also any idea how I can also force a change of a local directory?

Any tips, tricks, links, suggestions are much appreciated Wink

Thank you all...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
InGearX wrote:
1) Is there any way for me to actually pass the password?

I do not see a problem with your password. Anyway, you can URL-encode any character that you think causes a problem. Also you can setup a stored session in advance and open it instead of using URL.

Quote:
2) Also any idea how I can also force a change of a local directory?

Again, setup stored session in advance.
_________________
Martin Prikryl
InGearX

Guest


Wow thanks mate!
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