in reply to Need Advice on Folder/Drive locking

At the risk of sounding to simplistic I would just create a temporary file with a specific filename format that "reserves" space on the drive. When your script starts it looks for "drive:\CopyScript*.log and if one or more exist it parses the filename(s) to determine how much space is reserved.

That said, if the scripts calculates that this drive should be used it should first write it's temporary file, then sleep for a short time, then CHECK to make sure that another instance of the script hasn't already "slipped through" and reserved space, little checks like that can save you in the future.

The logic sounds good to my weary head... hope it makes sense!

  • Comment on Re: Need Advice on Folder/Drive locking