Archive: File Write Access


File Write Access
Hi!
I want to check if I can write to a file, and if not loop and check again with 500 MS intervall or so, and preferably a timeout thingy.

Can anyone help me, please?

PS: I'm a Newbie

Thanks!


Try something like this:

StrCpy $1 0

loop:
FileOpen $0 "c:\path\to\file" "w"
IfErrors 0 done
IntOp $1 $1 + 1
IntCmpU $1 50 done 0 done # if we got to 50 or passed it, enough
Sleep 500 # wait for 500ms
Goto loop
done:
FileClose $0

It's working great! Thank you!