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

martin

Re: thx

Thanks. I've corrected my answer.
thecotne

thx

actually you have wrong syntax correct is
winscp.exe sftp://user51:pass@wwwstage.nydc.site2.prv:22/usr/local/www/staging/ /rawsettings LocalDirectory=c:\temp


it does not work without equal sign
thecotne

after executing command i want GUI to be opened

but this command
winscp.exe /console /command "open sftp://user51:pass@wwwstage.nydc.site2.prv:22/usr/local/www/staging/" "lcd c:\temp"

opens command prompt (command line interface)
martin

Re: no one?

thecotne wrote:

actually that command does not work lcd is not executed

It works for me. Please show us a complete command-line, a console screenshot and a log file.
Also note that I have edited the command-line, because the original form is not recommended anymore (though it still works).

and i need to open GUI that command opens command line interface

I do not understand, what you mean by "open GUI that command opens command line interface". Please try to explain.
thecotne

Re: no one?

martin wrote:

User wrote:

Um...the stored session is not changing to the local directory set in the GUI (using version 4.1.6). The local directory automatically loads fine using the GUI, but not through scripting.

You haven't mentioned you are using scripting.

You can do:
(edited)
winscp.exe /console /command "open sftp://user51:pass@wwwstage.nydc.site2.prv:22/usr/local/www/staging/" "lcd c:\temp"


hello

actually that command does not work lcd is not executed
and i need to open GUI that command opens command line interface
i am developing sublime text integration of winscp https://github.com/thecotne/sublime-WinSCP/
martin

Re: no one?

User wrote:

Um...the stored session is not changing to the local directory set in the GUI (using version 4.1.6). The local directory automatically loads fine using the GUI, but not through scripting.

This issue has been added to tracker.
martin

Re: no one?

User wrote:

Um...the stored session is not changing to the local directory set in the GUI (using version 4.1.6). The local directory automatically loads fine using the GUI, but not through scripting.

You haven't mentioned you are using scripting.

You can do:
(edited)
winscp.exe /console /command "open sftp://user51:pass@wwwstage.nydc.site2.prv:22/usr/local/www/staging/" "lcd c:\temp"
User

Re: no one?

martin wrote:

Setting local directory from command line is not supported. You can set it in stored session.


Um...the stored session is not changing to the local directory set in the GUI (using version 4.1.6). The local directory automatically loads fine using the GUI, but not through scripting.

I have a saved session with the local and remote directory set. My settings are being saved in a winscp.ini file and the session information looks correct.

...in stored session...
LocalDirectory=C:\temp (in winscp.ini it's C:%5Ctemp)
RemoteDirectory=/remotefolder

...from command prompt...
W:\winscp.com
winscp> open user@sessiondotcom
winscp> pwd
/remotefolder
winscp> lpwd
W:\

I needed to use lcd to change the local, so when I use the synchronize command in a script I'm using the correct directories.
martin

Re: no one?

Setting local directory from command line is not supported. You can set it in stored session.
InGearX

no one?

nothing yet?
InGearX

How to switch local directory from comand line (batch)

I am able to specify the remote directory

start winscp380.exe sftp://user51:pass@wwwstage.nydc.site2.prv:22/usr/local/www/staging/


But I wish I could specify the local directory it should open as well - C:\+PROJECTS+\+PROJECT_A+\SITEA.COM\PRODUCTION\...

Any idea how?

Any tips, tricks, links, suggestions are much appreciated ;)

Thank you all...