使用命令行回滚所有文件替换/更改 [英] Rollback all file replaced/changes using command line
问题描述
大家好,
我正在修补Patch安装程序并且卡在了一点上。当我运行我的补丁文件(.bat)文件然后它将文件复制到包含a.txt,b.txt等文件的c:\ abc路径。
如果复制时出现任何问题,或者在执行此操作时发生任何错误。然后我想将所有更改回滚到早期版本。
例如: - 如果a.txt文件被替换,并且在更改b.txt文件时如果它给出错误。因此,在这种情况下,之前对其他文件所做的任何更改都应该回滚。
有没有办法做这样的事情....使用COMMAND LINE
Hi All,
I am working on Patch installer and am stuck at one point. When I run my patch file (.bat) file then it copies files to c:\abc path which contains a.txt,b.txt etc files.
In case if there is any problem while copy or any error occurs while doing this. Then I want to rollback all changes to earlier version.
eg:- if a.txt file is replaced and while making changes to b.txt file if it gives an error . So in that case whatever changes are done previously on other files should be rolledback.
Is there any way to do such things.... using COMMAND LINE
推荐答案
将原件复制到另一个文件夹,然后尝试更换,如果遇到错误,请从备份文件夹中恢复文件。
Make a copy of your originals to another folder then try replacing, if you encounter an error the restore your files from the backup folder.
这篇关于使用命令行回滚所有文件替换/更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!