如何更改我的默认本地目录(用于 psftp)?

huangapple go评论92阅读模式
英文:

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

问题

我如何在PSFTP中更改默认本地目录?我知道如何打开应用程序并使用lcd C:\where\I\want\to\go更改我的本地目录,但我希望每个会话都能自动运行该命令,或者不需要运行该命令。

英文:

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.

答案1

得分: 4

没有办法配置psftp以您选择的目录启动。psftp在其启动目录中启动。因此,您需要更改那个目录。

如果您通过快捷方式启动psftp,请更改快捷方式的启动目录。

如果您通过在Windows命令行中键入其名称来启动psftp,您可以创建一个批处理文件,执行cd然后启动psftp

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

如果将批处理文件的路径添加到PATH中,然后在PuTTY路径之前,键入psftp将启动批处理文件而不是psftp.exe

英文:

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.

huangapple
  • 本文由 发表于 2020年1月3日 20:07:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/59578364.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定