mmadsen32
asked on
Check if txt. file is in use in VBScript???
I'm using "BarTender" (label generating software) that is referencing a .txt file on our network drive. Unique serial numbers are very important to us for tracking purposes after it leaves out factory. I have script that the BarTender label is opening the .txt file, reading the value, re-writing the new value (with the original value + the number of serial tags I want to print), saves, and then closes the .txt file. The problem I'm having is although a small window of time, if I hit print from two different work stations at the same instant, both work stations are opening the .txt file at the same time and allows duplicate printing to occur. What I'm hoping to find out is if there's a way to have the script check in the .txt file is open. If so, I want it to stop the job and return an error saying "file is use please try again". If it's not in use I'd like to to continue to run through my script of opening, reading, writing, saving and closing. Any help would be greatly appreciated. thank you!
-Mike Madsen
-Mike Madsen
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
how did you get on? Did this help with the problem?
how did you get on? Did this help with the problem?
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER