Hi Don,

You want to upload an XML file and save a copy of it somewhere else?

You could just do two uploads on your form processing page, something like:

<cffile action="UPLOAD"
            filefield="UploadXmlFile"
                destination="#application.xml_root#"
                        nameconflict="MAKEUNIQUE">

<cffile action="UPLOAD"
            filefield="UploadXmlFile"
                destination="#application.xml_copy_root#"
                        nameconflict="MAKEUNIQUE">

Or have I misunderstood your question?

Will


-----Original Message-----
From: Don L [mailto:[EMAIL PROTECTED] 
Sent: 18 January 2008 15:31
To: CF-Talk
Subject: Duplicate an XML file with Cold Fusion 8

This is what I want to do: 
save/duplicate a copy of an uploaded XML file in case of need.

Techniques that I've tried to no avail.

Necessary bla bla:
The interface:
(It's an HTML form that provides mechnism to upload an XML file, like <input
type="file" name="UploadXmlFile"> )

The process:
a) check if the uploaded file is an XML file...
b) if yes, save/duplicate a copy of this uploaded XML file.
Possible techniques for b)
 1) <cfset FileClone = XmlNew()>

    <cfset FileClone = Duplicate(FORM.UploadXmlFile)>
    debug:
    <cfoutput> 
      #IsXML(FileClone)#                        
    </cfoutput>
  2)<cfsilent>
     <cfxml variable="FileClone">
       #FORM.FileToUpload#
       <!-- also tried the following -->
       #XmlFormat(FORM.FileToUpload)#
     </cfxml>
    </cfsilent>
    debug:
    <cfoutput> 
        #IsXML(FileClone)#                      
    </cfoutput>

Another dead horse?  Thanks. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296821
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