File In Use

Often a file that needs to be Ftp or copied is currently in the midst of being created or written to by some other process.  Copying or transferring the partial file is not desirable.  This feature allows the certain tasks like the File Monitor task to 'ignore files that are detected as being in use'.  Hence this feature (module) is called only if you select the 'ignore if file is in use' option within the tasks. 

This feature is not guaranteed to work on all operating systems and processes. You should test whether the write check, property change check, or rename check option works best for your operating system and process.

1) Write check
If you select this option, an attempt will be made to open a write connection to the file (write nothing to the end of the file and close file).  If the connection fails, the file is assumed to be in use.  Not all Operating systems automatically lock the files once a process is writing to the file.  Once a file is being written to on windows, generally other processes are not allow to write to it.  This option was tested to work correctly on windows 2000.  However, on many unix systems, this option may not work.

2) Property Change check
This option monitors the Files size and modified date every second for the test time entered.  Some operating systems will set the file size as the expected final file size even though its size is clearly changing with time.  Same with the File modified date.  On some operating systems the file modified date will be set as the creation date initially.  Once the file is written to, its modified date may be reset.  Hence it is likely that neither file size changes or date modified changes may be detectable.  Hence this option is not guaranteed to work on all operating systems.

3) Rename Check
If you select this option, an attempt will be made to rename the file.  If the file can be renamed, it is assumed that it is not in use.   This option has been tested on windows 2000 only.