On Tuesday, July 03, 2007 8:05 PM, Eugene Vital wrote: Couldn't you just have a table for storing the last used file name and auto increment it ;)?
That is what I would do if my program was the only one writing to the directory. There are potentially other programs creating files there as well. I'm guessing the others would probably use the API approach so it would make sense to do that but I don't have the time available to learn how to do it that way. - Joe > > > > >> Joe >> >> On Tuesday, July 03, 2007 2:46 PM, Ted Roche wrote: >> >>> Date: Tue, 3 Jul 2007 14:46:11 -0400 >>> From: Ted Roche >>> To: [EMAIL PROTECTED] >>> Subject: Re: Try/Catch handling of Copy File errors >>> >>> On 7/3/07, Joe Yoder <[EMAIL PROTECTED]> wrote: >>> >>> >>>> I think I can achieve what I need by looping FCREATE(<UniqueName>) until >>>> success. At that point I will have the name of a file I can safely >>>> overwrite by setting safety off. >>>> >>> There's a windows API call. I think it's CreateTemporaryFileName() >>> that does exactly this. Limited to 65,535 files iirc. >>> >>> Nope, a quick Google shows GetTemporaryFileName. Here's the VB >>> knowledgebase article: >>> >>> http://support.microsoft.com/kb/195763 >>> >>> -- >>> Ted Roche >>> Ted Roche & Associates, LLC >>> http://www.tedroche.com >>> >>> >>> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

