Skip to main content
Known Participant
Apr 25, 2013 10:15 AM UTC
Question

cffile action="write" not working

Hi all

im using the following code

<cffile action="write" file="#usersId#.txt" output="tewrasdfasdfasdf asdf a dsfa " nameconflict="OVERWRITE">

however it doesnt throw any errors, and doesnt create the file in short it does nothing

im using ms server 2008 and cf 10

can anyone shed any light on it

thanks

    This topic is closed to new replies. Start a new post to keep the conversation going.

    6 replies

    Inspiring
    Apr 26, 2013 7:24 AM UTC

    Amongst other issue you might have, <cffile action="write"> doesn't - to the best of my knowledge - support the nameconflict attribute; that's just for UPLOAD.

    http://help.adobe.com/en_US/ColdFusion/10.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7372.html

    --

    Adam

    Translate
    tramp-manAuthor
    Known Participant
    Apr 26, 2013 7:26 AM UTC

    Already sorted thanks, It was writing the file somewhere else

    Translate
    Inspiring
    Apr 26, 2013 7:28 AM UTC

    tramp-man wrote:

    Already sorted thanks, It was writing the file somewhere else

    Yes, I understand that. I was just advising that you're obviously expecting that functionality to work, and it won't.

    --

    Adam

    Translate
    Participating Frequently
    Apr 25, 2013 10:48 AM UTC

    I'm guessing it does create a file, but probably isn't putting it in the location you're expecting.  Try specifying the full filepath for it.

    Translate
    tramp-manAuthor
    Known Participant
    Apr 25, 2013 10:51 AM UTC

    your absolutely right

    thanks

    Translate