I am trying to automate weekly generation of a database. As a first step in this process, I need to obtain a set of files from network location M:\
. The process is as follows:
- Delete any possibly remaining old source files from my local folder (
REMOVE_OLD_FILES
). - Obtain the names of the required files using regular expressions (
GET_FILES
). - Copy the files from the network location to my local folder for further processing (
COPY/MOVE FILES
)
Step 3 is where I run into trouble, I frequently receive the below error:
Error processing files. Exception : org.apache.commons.vfs.FileNotFoundException: Could not read from "file:///M:/FILESOURCE/FILENAME.zip" because it is a not a file.
However, when I manually locatae the 'erroneous' file on the network location and try to open or copy it, there are no problems. If I then re-run the Spoon job, no errors occur for this file (although the next file might lead to an error).
So far, I have verified that steps 1 and 2 run correctly: more specifically, there are no errors in the file names returned from step 2.
Obviously, I would prefer not having to manually open all the files first to ensure that Spoon can correctly copy them. Does anyone have an idea what might be causing this behaviour?
For completeness, below are the parameters selected in the COPY/MOVE FILES
step.