Search code examples
windowsfile-locking

Prevent the access from copying a file when other resources are using it


In my application, i have one exe file that will do some conversion on my videofiles in a directory, and also i have used cute ftp to transfer the files present in the directory to another server.

CUTE FTP is configured to be run on every mins.

When 25% of job is over for a video file, CUTEFTP is transferred that file to other server.

What are the ways to fix this problem.


Solution

  • Process the file in a different directory and then move it to a place where CUTE FTP will pick it up after the conversion is finished.

    [EDIT] Don't use copy, use move. Both directories must be on the same harddisk. When using the Windows Explorer, use "Cut" or just drag the file with the mouse. Make sure there is no little "[+]" when you drop it.