• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why a file not picked up?

 
Yongping Wang
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,All
I run into a strange problem.
My thread (continuous running) keeps scanning files over folders. It will call another program to process the file if there is any new coming file. It works very well except one situation: the thread doesn't recognize a file when the file is in the process of transfering (or copying). That's understandable because this new file is in use by another source. However the thread still is not able to sense thie file even in next runs. But it can find other files as long as that situation (described as above) doesn't happen to these files.
Any comments? Thanks a lot for your help.
Y.P
[ April 24, 2008: Message edited by: Yongping Wang ]
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its nearly impossible to tell the problem unless you provide the code that scans the folders/directories for new files.
I dont think anything on the OS/java level will land you into this situation.
By the way, what is the meaning of the statement:
the thread doesn't recognize a file

You mean that the file does not come in the result of listFiles() method call on the directory?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!