With the WindowsEnabler WAITFILE.EXE you can wait for a file to become available again (unlocked).
WAITFILE.EXE [/C <count>] <file>
You can use the tool in combination with *EDIT when you want to wait for the user to finish editing the document.
count
Determines how often to check if the file is file accessible (in 500ms increments). Default: /C 1
Note that waitfile will always wait 2 seconds before checking the file.
file
The locked file that has to be checked by waitfile