Determining a file's status? (Busy/not busy)

FuturShoc

Active member
Joined
Jul 28, 2006
Messages
27
Location
Hot Springs, Arkansas
Programming Experience
3-5
Thanks to everyone who have been so helpful as I recently began posting questions here at this forum. The time you've taken to offer your input on my questions is very much appreciated.

Things are progressing along pretty well as I learn my way around VB/.NET.
My current quandry, however, deals with busy files.

I am copying a file from a server to a local directory to my PC. I need to act on that copy of the file, but I currently have no way of knowing whether or not that file copy has completed before I try and rename the local file.

I've been rooting around in the various file info properties, but have yet to find a way of testing the busy status of a file.

Can someone offer a suggestion?

If it was just a matter of getting a file.busy status attribute to the file, this would be easily accomplished with a do/while loop until the test came back as "not busy". But this goal doesn't seem to be as easily achieved as I thought it might be.

Thanks in advance.
 
I'm pretty sure there is no flag which states a file is already open/busy. You simply need to trap the error returned by your rename to check if the action was completed or not.
 
Back
Top