I've set up a Coldfusion Directory Event Gateway on my site (Win2K3 server, CF8 
Ent).  The DW monitors an FTP directory where my users upload a batch of 5 PDF 
files each week.  The files are named file1.pdf, file2.pdf and so on.  When my 
DW gateway sees an addition or a file change, it copies the file to a new 
location, reads the PDF's meta data and uses that to rename the file and then 
add an entry to a database table for that file (the table entry gets used to 
populate a PDF archive list on a different page). In general this all works 
with a few exceptions.

ISSUE 1: If I add a new file, the gateway sees it and calls my onAdd function 
(which actually just calls my onChange function). If I rename a file in that 
directory, the onChange event fires and my code runs.  However, if I upload a 
new file1.pdf file which overwrites the old file1.pdf, nothing happens. The new 
file is truly different and has a new modification date.  I read through the 
Java class and mod date is how the gateway determines a change.  Now, so far am 
not actually FTPing a new file in, but rather just coping it in from my local 
machine to the server directory via a mapping.  

I saw a solution for a similar issue which talked about setting up the onDelete 
event b/c the FTP will actually delete then add the file. Does this sound like 
a solution? 

Issue 2: I had a lot of CFM files that needed to be put into the archive, so I 
converted those to PDFs.  I then put all of them in my watch directory so my 
script would process them.  To my surprise, the script would only load 11 files 
at a time.  So after some tests to confirm the issue and the correct number of 
files, I then loaded my batch, 11 files at a time.  Any ideas why this would 
happen?

My Specs again:
Windows 2003 Server 
Coldfusion 8 Enterprise
In my config file:
     checking my directory every minute (60000 milliseconds)
     only checking for .pdf extension
     Set an onAdd and onChange function call, but no onDelete
     my onAdd function simply calls my onChange function, passing 
        in the CFEvent argument that it received


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322546
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to