I just want to lock a file so that anyone can't open or copy the file while it is being opened. My program uses Shell function to open a file with its associated program (not mine) and then I need to lock it.

Thanks.