Skip to main content
Known Participant
April 25, 2013
Question

cffile action="write" not working

  • April 25, 2013
  • 2 replies
  • 1456 views

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 has been closed for replies.

    2 replies

    Inspiring
    April 26, 2013

    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

    tramp-manAuthor
    Known Participant
    April 26, 2013

    Already sorted thanks, It was writing the file somewhere else

    Inspiring
    April 26, 2013

    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

    Participating Frequently
    April 25, 2013

    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.

    tramp-manAuthor
    Known Participant
    April 25, 2013

    your absolutely right

    thanks