friends Posted June 29, 2006 Share Posted June 29, 2006 by using FileSaveDialog with the option "Prompt To Overwrite if file exists", I found out that the contents is appended into the file but not overwritten it. I wonder if it is a bug or user has to do the checking on their own ? I assume that with the feature "overwrites if file exists" would totally write a new content into file. Pls advise. Link to comment Share on other sites More sharing options...
jpm Posted June 29, 2006 Share Posted June 29, 2006 by using FileSaveDialog with the option "Prompt To Overwrite if file exists",I found out that the contents is appended into the file but not overwritten it.I wonder if it is a bug or user has to do the checking on their own ?I assume that with the feature "overwrites if file exists" would totally write a new content into file.Pls advise.Can you post a small script that reproduce the behavior you are facing?Thanks Link to comment Share on other sites More sharing options...
friends Posted June 29, 2006 Author Share Posted June 29, 2006 This is not a complete code. But when I use it to write the content using FileWriteLine() to be saved as a .reg file it will append the data into the file, instead of overwritting. FileSaveDialog ("Export Registry File", @MyDocumentsDir, "Registration File (*.reg)", 24, "Cash Drawer.reg") sorry.... cos not providing complete coding. I will try to reproduce the coding and put it up here. Link to comment Share on other sites More sharing options...
Valuater Posted June 29, 2006 Share Posted June 29, 2006 AFAIK FileWriteLine() is a completely seperate issue to FileSaveDialog(). FileSaveDialog() does not need FileWriteLine() because it saves the complete file with the name you input.... maybe you want FileOpen() to use with FileWriteLine() 8) Link to comment Share on other sites More sharing options...
friends Posted July 2, 2006 Author Share Posted July 2, 2006 Thanks for your information. I'll try that out.... 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