![](/img/trans.png)
[英]Windows 10: How can I determine whether a batch file is being run from network mapped drive
[英]Best way to run batch file in network drive in Windows Sever through SSH
我目前正在使用 SSH 连接到带有 freeSSHd 的 Window 服务器来运行批处理文件。
如果批处理文件在 C 驱动器中,则使用我的命令有效:
C:\cygwin64\bin\ssh.exe -o 'StrictHostKeyChecking no' server -l name 'C:\test.bat'
但是,如果我的批处理文件在非 C 驱动器中,那么它会说:系统找不到指定的驱动器。 例如:
C:\cygwin64\bin\ssh.exe -o 'StrictHostKeyChecking no' server -l name 'W:\test.bat'
那么如何通过 SSH 在网络驱动器中运行批处理文件?
还有什么方法可以检查 W:\test.bat 文件是否存在?
您应该首先使用此命令更改当前目录
w:
那么你应该能够运行脚本。 无论如何,几个月前我遇到了同样的问题,最后制作了一个超级简单的 PHP 本地脚本来运行我的蝙蝠。 如果您已经拥有 PHP 服务器,我认为这是最好的方法
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.