0

我正在尝试制作一个将最新文件从文件夹上传到公共 html 的 bat 脚本。这个怎么做?我现在让这个工作。

c:pscp -pw password c:\index.html user@host:public_html/index.html
4

1 回答 1

0

知道了:

set source="C:\dir"
FOR /F "delims=|" %%I IN ('DIR %source% /B /O:D') DO SET NewestFile=%%I

c:pscp -pw password %source%\%NewestFile% user@host:public_html/%NewestFile%

pause
于 2016-07-31T12:58:51.983 回答