Here's a thought on what might be going on (and if so, I'm open to suggestions).
Basically, if I'm writing to the "badFiles" location, I have almost invariably broken out of a <cfloop file="whatever"> loop before reaching the end of the file (using <cfbreak>). Is it possible that ColdFusion still has a lock on the file and, therefore, can't delete it? (I'm thinking this may be the case, because right now I can't manually delete that file from the source folder, either). Assuming that's the case, any ideas on how to get around it? Because this is a process we don't want to bog down unnecessarily, I'd rather not read the whole file in (the old way of looping over a file) or loop over the entire file if I don't have to. Scott On Wed, Jan 13, 2010 at 1:54 PM, Scott Brady <dsbr...@gmail.com> wrote: > Well, here's a wrinkle: > > This line (same as before) doesn't delete the file in the source: > <cffile action="move" > source="#arguments.stConfig.ftpFileLocations.pending##local.qFiles.name#" > destination="#arguments.stConfig.ftpFileLocations.badFiles##local.qFiles.name#" > /> > > This line (different destination, same source) DOES delete the course file: > <cffile action="move" > source="#arguments.stConfig.ftpFileLocations.pending##local.qFiles.name#" > destination="#arguments.stConfig.ftpFileLocations.archived##local.qFiles.name#" > /> > > The only difference between > arguments.stConfig.ftpFileLocations.badFiles and > arguments.stConfig.ftpFileLocations.archived is the name of the > specific folder (same parent folders, etc.). > > It almost seems like it would be a permissions issue on the "badFiles" > folder, but wouldn't that only affect whether the file could be > written to THAT folder, not deleting it from the source? > > On Tue, Jan 12, 2010 at 4:06 PM, Scott Brady <dsbr...@gmail.com> wrote: >> I don't think permissions or other processes would be an issue. This >> is on my local machine, and I haven't had problems before. Now, I'm >> doing a cffile delete and it's not even throwing an error if the file >> doesn't exist (which it should, right?). >> >> Maybe I'll restart CF and see what happens. :) >> >> >> On Tue, Jan 12, 2010 at 2:55 PM, <b...@bradwood.com> wrote: >>> >>> I would check permissions too. CF might have permissions to write and >>> read, but not delete. >>> >>> If this was the case though, I would expect there to be an error. >>> >>> As a debugging measure, you could dump out the contents of a cfdirectory >>> right after moving the file and see if the file exists. It is possible >>> some other process is writing the file back in a minute later before you >>> are looking. Also, trying a straight-up delete with cffile will show >>> you if it is a delete permissions error. >>> >>> ~Brad >>> >>> -------- Original Message -------- >>> Subject: Re: CFFILE move is copying >>> From: Scott Brady <dsbr...@gmail.com> >>> Date: Tue, January 12, 2010 3:46 pm >>> To: cf-talk <cf-talk@houseoffusion.com> >>> >>> >>> That's probably it -- though, I guess I'd expect an error to result. I >>> guess I can try deleting after the move -- not a solution, but it >>> might tell me if the file is locked. (It's just a text file, so not >>> much should be locking it) >>> >>> Scott >>> >>> On Tue, Jan 12, 2010 at 2:24 PM, Dave Watts <dwa...@figleaf.com> wrote: >>>> >>>> Well, a move is basically just a copy followed by a delete. So maybe >>>> CF can't delete the file? Maybe it's locked by CF itself, preventing >>>> it from being deleted. >>>> >>> >>> >>> >>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:329696 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4