Archive: Delete not working as intended


Delete not working as intended
Hey all,

I'm trying to delete files in a loop, but the files don't get deleted for some reason.
If someone could please point me into the right direction...?!


fileLoop:
FileRead $INSTALL_LOG $R0
${If} $R0 == "[STOP] Install"
goto dir
${Else}
; Determine if file or directory
StrCpy $R2 $R0 3
StrCpy $R3 $R0 "" 4
${If} $R2 == "[F]"
; not working even though the value in $R3 seems to be correct
Delete $R3
${EndIf}
goto fileLoop
${EndIf}


Edit: Removed unneccessary FileRead

you must ensure that the file is not in use at the time


It is definately not in use at the time.


You need to use TrimNewLines on it.
Not sure what the StrCpy $R3 $R0 "" 4 is for?

Stu


Thanks a lot, that did the trick ;)

That just extracts the file's/directory's name.