- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello All,
Can anyone tell me how i can stop my code from overwriting files or do i have to review by entire suite of programs? Partly my fault of course as i was using the oInvDoc.SaveAs that if the file exists when given the new path, it would error out in which i would catch and do some stuff to find a new part number (yes i understand, its shotty, but i program for my team to get the 80% functionality for the 20% work).
So now, oPart.SaveAs will overwrite good files without an error. Is there a simple way to change it back to "error out"?
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello Andrew,
Dim curFile As String = "c:\temp\test.ipt"
Console.WriteLine(If(File.Exists(curFile), "File exists.", "File does not exist."))
Cheers
Georg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
its unfortunate, but thats what i ended up doing. had to rewrite a ton of stuff. I wonder how many more easter eggs there are waiting to smack amateur programmers in the face LOL