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: Putty relative path not working. Must load from WinSCP starting directory.

I'm not sure I understand.

What do you mean by "load putty"? Are you referring to "Open session in PuTTY" command?

By default WinSCP is configured to run %ProgramFiles%\PuTTY\putty.exe, so the working directory should not matter.
user564758

Putty relative path not working. Must load from WinSCP starting directory.

I have experienced a slight issue with how WinSCP loads putty.

I have WinSCP loaded via bat file.

loadme.bat
calls
start bin\WinSCP.exe


It seems that the putty integration does not recognize a relative path when putty is in a different directory to the starting command. So unless it is in the same directory as the bat file it cannot work without setting a full path.

If i cd into the folder first using the bat file, then call do start
WinSCP.exe
it works as intended.

So this bat file only works if putty is in the same location as the bat file.

start bin\WinSCP.exe & for %%f in (%cd%\keys\*.ppk) do start bin\kageant.exe "%%f"

exit


Whereas this bat file only works if putty in the same directory as WinSCP.

cd %cd%\bin

start WinSCP.exe & for %%f in (%cd%\..\keys\*.ppk) do start kageant.exe "%%f"
exit


Is this a bug or something intentional i don't fully understand? I'd like to be able to set a relative path to putty regardless of where WinSCP was started.