A short snippet 

Regards

Stew


<!--- Get the data to populate the project drop down box ---> 
<CFQUERY name="File_Name" datasource="#application.dsource#">
SELECT Distinct File_Name1 FROM Files
</CFQUERY>

<!--- Choose a project then post back to itself ---> 
<FORM name="Info" action="move.cfm" method="post">
  <SELECT name="File_Name"><CFOUTPUT query="File_Name"><OPTION
value="#File_Name1#">#File_Name1#</CFOUTPUT> 
  </SELECT>
  <INPUT type="submit" value="Search">
</FORM>

<!--- Check if the template has been posted back to itself and if a project
has been chosen get the info ---> 

<CFIF isDefined("form.file_name")>
<CFQUERY name="Files" datasource="#application.dsource#">
SELECT File_Name2 FROM Files where File_Name1 ='#form.File_Name#'
</CFQUERY>

<CFSET File_Name1=form.file_name>
<CFOUTPUT query ="Files">#File_Name2#
<!--- add your own directories, ip address etc --->
<CFFILE action="Copy" 
    source="<!--- Source Directory --->/#File_Name1#" 
    destination="<!--- Destination Directory --->/#File_Name2#">
  <A href="http://<!--- Address --->/#file_Name2#">#File_Name2#</A> 
</CFOUTPUT>
</CFIF>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to