Topic "Calling PuTTY: automatic change catalog"

Author Message
Splinty
[View user's profile]
Donor
Joined: 2008-10-01
Posts: 33
Location: Russia, Kurgan
Hello.
Does exist a way while calling a PuTTY submit a current catalog from Tree to PuTTY that PuTTY go there? Terminal (Ctrl-T) does it successfully.
It would be a very nice.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Sorry, I do not understand. Do you mean to instruct PuTTY to start in the same working directory as WinSCP is?
_________________
Martin Prikryl
Splinty
[View user's profile]
Donor
Joined: 2008-10-01
Posts: 33
Location: Russia, Kurgan
Yes, it was the my question. Now i need to copy current WinSCP path (Ctrl-]) and insert into just opened PuTTY session (Ctrl-P) with cd command. Yes, it's not a problem, but it would be very suitable to automate it.
DaSilva

Guest


Yes, that would be very handy...
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Any suggestion how to do that? Smile
WinSCP could add "cd" command to Connection > SSH > Remote command session option of PuTTY. But it also needs then to start a shell, otherwise PuTTY would exit immediately after issuing "cd" command.
So something like
cd "/current/winscp/path/" ; $SHELL -l
in Remote command might do the work.
However I'm not sure how much reliable that would be.

This issue has been added to tracker.
Splinty
[View user's profile]
Donor
Joined: 2008-10-01
Posts: 33
Location: Russia, Kurgan
cd "/current/winscp/path/" ; $SHELL -l looks funny Mr. Green
Enviroment variables is one more way.
let's try it also.

I mean, that if WinSCP set PUTTYPATH to current path then i can make cd $PUTTYPATH in .bash_profile. Yes, it can fail on SSH-1 servers (reading PuTTY manual) but please, don't regret that idea. It's not so hard to add in default PuTTY connection properties that parameter, right?
_________________
Sors mea Jesus!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Splinty wrote:
I mean, that if WinSCP set PUTTYPATH to current path then i can make cd $PUTTYPATH in .bash_profile. Yes, it can fail on SSH-1 servers (reading PuTTY manual) but please, don't regret that idea. It's not so hard to add in default PuTTY connection properties that parameter, right?

If your SSH server supports setting environment variables. I believe that OpenSSH (the most common) does not.
_________________
Martin Prikryl
Splinty
[View user's profile]
Donor
Joined: 2008-10-01
Posts: 33
Location: Russia, Kurgan
Well... It was my hope... But You are right. it doesn't.
So, it seems, that topic can't be realized. But if You will correct Terminal, it will be really happy day Mr. Green
I'd like to say, that it will be much more useful You will spent time in developing Terminal.
I mean
1. Translation support
2. Fonts and colors setup
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