cfdirectory action="copy"

61 views
Skip to first unread message

Tom Miller

unread,
Jan 7, 2016, 1:49:16 PM1/7/16
to Lucee
I'm trying to copy a large amount of files from one location to another. This is a daily scheduled task, and I don't want to have to overwrite all the files every time (I'm only interested in the new ones).

Ideally, I want cfdirectory action="copy" recurse="true" nameconflict="skip", but that doesn't seem to be an option, even though it appeared to be in the discussion here: https://issues.jboss.org/browse/RAILO-2193

Am I missing something? The docs seems a bit sparse on this particular topic.

Thanks,

Tom.

Jean Moniatte

unread,
Jan 7, 2016, 2:28:15 PM1/7/16
to lu...@googlegroups.com
Not sure about the cfdirectory question, but if the only requirement is to copy files from one location to another, why use CF and a scheduled task? Tools like rsync make this easy and fail proof.

Hope it helps.
Jean

--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/fd78d0c6-186c-473e-bdae-018824cae5dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Dixon

unread,
Jan 7, 2016, 3:42:46 PM1/7/16
to lu...@googlegroups.com
With Jean on this one, right tool for right job and I don't think Lucee (or CFML in general) is the right tool.

Kind regards,

Andrew

Tom Miller

unread,
Jan 7, 2016, 3:47:51 PM1/7/16
to Lucee
I'd normally agree - but this is an s3 sync within an AMI that I cannot spec. My only option is a cfml script as that's all I know will be running on the server...

Igal @ Lucee.org

unread,
Jan 7, 2016, 3:50:27 PM1/7/16
to lu...@googlegroups.com
Tom,

Which part doesn't work?  The "skip"?  Do you get an error or it just goes to copy the directory?

Igal Sapir
Lucee Core Developer
Lucee.org

Tom Miller

unread,
Jan 7, 2016, 4:02:06 PM1/7/16
to Lucee
Just says "skip" is not a valid attribute. Attributes are "overwrite (merge), error"

Igal @ Lucee.org

unread,
Jan 7, 2016, 6:33:55 PM1/7/16
to lu...@googlegroups.com
What version are you running?  Can you please copy and paste the exact message that you see?

This should be implemented in Lucee 4.5
https://github.com/lucee/Lucee4/blob/master/lucee-java/lucee-core/src/lucee/runtime/tag/Directory.java#L23


Igal Sapir
Lucee Core Developer
Lucee.org

AJ Mercer

unread,
Jan 11, 2016, 1:02:28 AM1/11/16
to lu...@googlegroups.com
doco says skip is for 'create'

nameconflict
(string, optional)

When used with action="copy" the possible values are: [Overwrite]|Error. When used with action="create" the possible values are: [Error]|Skip. Ignored for all other actions.


​no mention of merge




For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages