Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了一个批处理脚本来使用 wget for Windows 自动更新一些文件。它下载文件名中带有版本号的文件,例如server-2.0.exe. 我想自动将文件重命名为server.exe.
server-2.0.exe
server.exe
这可能会满足您的需求,具体取决于文件名的可变性:
ren C:\server*.exe server.exe
我认为 wget 直接在其命令中具有该选项。
--output-document=file
试试这个:
ren server????.exe server.exe