Archive: FileOpen, FileWrite, FileClose problems


FileOpen, FileWrite, FileClose problems
I'm having problems writing to a file. Is there something I'm missing in the following 4 lines of code?


StrCpy $0 "C:\TEMP\MyFile.txt"
FileOpen $1 $0 a
FileWrite $0 "Put words in file"
FileClose $0

This creates the file but doesn't write to it. Any help?

Thanks,
Eric


BugFix:

StrCpy $1 "C:\TEMP\MyFile.txt"
FileOpen $0 $1 a
FileWrite $0 "Put words in file"
FileClose $0