How can I simulate a "locked" file (one which has a write lock)
try this:
( >&2 pause ) >> yourfile.txt
>>
opens yourfile.txt
in append mode
see this for a reference
depends, but in case, MS word locks
if you are wonderig if your application lock files and it do not relase locks:
just modify a bit your aplication (to create a testapp) and never close the file (and keep it runnig)