Locking of Files

Can anybody help me in this case:

Suppose a file is getting stored in a folder and at the same time it is also being copied, now the question is if the file is getting stored at that moment I do not want copy that file but other files which are already stored will get copied to another folder.

Thanks in advance.

[332 byte] By [LabanyaRoya] at [2007-9-30 1:35:52]
# 1
Hi,Be more descriptive in your Query.Kavitha
Kavi_herea at 2007-7-16 6:13:08 > top of Java-index,Other Topics,Algorithms...
# 2
If some files are to be stored in a folder(say A) and from that folder those files to be copied in a separate folder(say B) then at the time when they are getting stored(A) those particular file should not get copied to B.Later on when again run that files should get copied.
LabanyaRoya at 2007-7-16 6:13:08 > top of Java-index,Other Topics,Algorithms...
# 3
Store the file in a separate folder and move (rename) it when it is ready into the folder you want to access it. Thus no partially written files will appear in that folder.
BIJ001a at 2007-7-16 6:13:08 > top of Java-index,Other Topics,Algorithms...
# 4
Can you help me in detail .How will i know that particular file is locked by Operating system will not be copied but stored in a separate folder so that file of zero size is not copied.
LabanyaRoya at 2007-7-16 6:13:08 > top of Java-index,Other Topics,Algorithms...
# 5
Moving the file into the destination folder is the job of the process writing the file, in the case the file could be written to the end without problem.
BIJ001a at 2007-7-16 6:13:08 > top of Java-index,Other Topics,Algorithms...