windowsputtypsftp

How do I change my default local directory (for psftp)?


How do I change my default local directory in PSFTP? I know how to open the application and change my local directory with lcd C:\where\I\want\to\go, but I want every session to automatically run that command, or not need that command run.


Solution

  • There is no way to configure psftp to start in a directory of your choice. psftp starts in its start up directory. So you will have to change that.

    If you start psftp via a shortcut, change the shortcut startup directory.

    If you start psftp by typing its name on Windows commandline, you can create a batch file that does cd and then starts psftp.

    cd C:\where\I\want\to\go
    C:\Program Files (x86)\PuTTY\psftp.exe" %*
    

    If you put the path to the batch file to PATH before the path to the PuTTY, typing psftp will start the batch file instead of psftp.exe.