View Single Post
Old 2018-01-18, 00:00   #3
potonono
 
potonono's Avatar
 
Jun 2005
USA, IL

193 Posts
Default

If the file is locked, the move command will give you an error indicating, "The process cannot access the file because it is being used by another process" and indicate that zero files were moved. You would need to test if the indicated 'write operation' locks the file or not. For example Excel locks a spreadsheet file when opening, but Notepad doesn't lock a text file when opening.
potonono is offline   Reply With Quote