friends Posted December 3, 2005 Share Posted December 3, 2005 I wonder if IniWrite() can overwrite the content of the previously output file ? If it couldn't, how should I make it so ? I wanted it to be worked like FileWriteLine(), where we can have an option to choose whether to overwrite the file. Please advise. TQ. Link to comment Share on other sites More sharing options...
themax90 Posted December 3, 2005 Share Posted December 3, 2005 If FileExists($Ini) <> 1 Then IniWrite($Ini, "Info", "Creation", "Ini has been created!") ; Etc... EndIf Hope that solved your problem, fill it in with the appropriate values if you wish Link to comment Share on other sites More sharing options...
friends Posted December 3, 2005 Author Share Posted December 3, 2005 If FileExists($Ini) <> 1 Then IniWrite($Ini, "Info", "Creation", "Ini has been created!") ; Etc... EndIf Hope that solved your problem, fill it in with the appropriate values if you wish Thanks for the reply. May be I didn't make my question clear enough (Sorry !) Hmm... does the IniWrite() will by default overwrite the file ? Example, when I 1st run a program, a .INI file is created. When I 2nd run a program, will this time .INI file overwrites the previous (1st run .INI file) ? Thanks. I hope I make it clears Link to comment Share on other sites More sharing options...
MHz Posted December 3, 2005 Share Posted December 3, 2005 When I 2nd run a program, will this time .INI file overwrites the previous (1st run .INI file) ?Thanks. I hope I make it clears IniWrite() creates the file if it does not exist. Any further use will only update the values that you choose. FileWriteLine() is much different to IniWrite() in comparison. IniWrite() is more like RegWrite() in that it changes values.If you want to overwrite with a new ini, then you would need to FileDelete() the ini file and create it again with Iniwrite(). You normally would not do this but shows how if desired to. Link to comment Share on other sites More sharing options...
friends Posted December 4, 2005 Author Share Posted December 4, 2005 IniWrite() creates the file if it does not exist. Any further use will only update the values that you choose. FileWriteLine() is much different to IniWrite() in comparison. IniWrite() is more like RegWrite() in that it changes values.If you want to overwrite with a new ini, then you would need to FileDelete() the ini file and create it again with Iniwrite(). You normally would not do this but shows how if desired to.Thanks, I totally got it ! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now