passing password in command line?

Advertisement

InGearX
Guest

passing password in command line?

I have the following batch.bat file:

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
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 ;)

Thank you all...

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: passing password in command line?

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.

2) Also any idea how I can also force a change of a local directory?
Again, setup stored session in advance.

Reply with quote

Advertisement

You can post new topics in this forum