我想用它的原始内容替换文件 1.txt,除了 R1 中的行,我为此编写了以下代码:
FileOpen $0 "1.txt" "r"
GetTempFileName $R0
FileOpen $1 $R0 "w"
loop:
FileRead $0 $2
IfErrors done
strcmp $R1 $2 loop here
here:
FileWrite $1 $2
Goto loop
done:
FileClose $0
FileClose $1
Delete "1.txt"
CopyFiles /SILENT $R0 "1.txt"
Delete $R0
但它不能正常工作,它保持 1.txt 不变。有人可以帮我找出问题所在吗?