如何在运行时使用操作系统包重命名可执行/二进制文件?
实际上这是一个非常简单的问题(可能有一些棘手的实现)。我有一个在二进制文件中执行的命令行应用程序,并且具有更新功能,可以用最新的文件重命名旧文件。
如何在使用 os
包或其他替代方案的先前二进制文件运行时实现二进制文件重命名(例如 Windows 中的 exe
)?
示例:
先前的二进制文件:version1.exe
最新的二进制文件:version2.exe
我希望 version1.exe
按名称“转换”为 version2.exe
,而不在运行时创建任何临时文件等。
actually this is a pretty straightforward question (with possible tricky implementation maybe). I have a command-line application which executed within a binary file and has an update feature which rename the old file with the newest one.
How can I implement binary file renaming (let's say exe
in Windows) during runtime of the prior binary using os
package or other alternatives?
Example :
prior binary : version1.exe
latest binary : version2.exe
I want version1.exe
"transform" into version2.exe
by name, without creating any temporary file or such during runtime.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论