Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Help With Cffile Move
kvarnerexpress
post Sep 10 2005, 04:09 PM
Post #1


Super Member
*********

Group: Members
Posts: 407
Joined: 13-December 04
Member No.: 2,696



This is my first time playing with cffile. I have the code working where the file gets uploaded to a folder on the server. Now I'd like to move it to a folder elsewhere where folks can access it. My problem is that I can't figure out how to reference the variable that holds the name of the file once it's been uploaded. I feel like an idiot because it should be something simple but it's not coming to me and nothing I try will work. How do you reference the filename once it's been uploaded?

Thanks for any help!

Here is the code on the submit page:

Code:
CODE

<FORM ACTION="UploadSubmit.cfm" METHOD="POST" name="UploadForm" enctype="multipart/form-data">

<input type="file" name="UploadFile" id="UploadFile" size="40">
<input type="submit" name="UploadSubmit" id="UploadSubmit" value="Submit">

</FORM>



And here is the code on the action page:

Code:
CODE

<cfif ISDEFINED("form.UploadSubmit")>
<cffile action="upload" filefield="UploadFile" destination="D:\DocLibrary\Docs" nameconflict="makeunique">

<cffile action="move" source="D:\DocLibrary\Docs\#????#" destination="F:\DocumentLibrary">
</cfif>




Thanks,kvarnerexpress
Go to the top of the page
 
+Quote Post
mcfly
post Nov 4 2005, 03:59 AM
Post #2


Newbie [Level 1]
*

Group: Members
Posts: 15
Joined: 4-November 05
Member No.: 13,784



After you upload a file, quite a number of cffile "status variables" are available to you. Some of the ones you will probably be interested in are (snipped from the Macromedia docs):

serverDirectory
Directory of the file saved on the server

serverFile
Filename of the file saved on the server

serverFileExt
Extension of the uploaded file on the server (without a period)

serverFileName
Name of the uploaded file on the server (without an extension)

A little bit of experimentation with these should allow you to do what you want.

HTH
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. What Will Be The Side Effects If We Can Move And Think On The Speed Of Light(2)
  2. How Do I Move On To Next Relationship?(6)
  3. Wordpress Backup For A Server Move(2)
  4. First Move?(2)
  5. When Do I Move From Newbie To Member?(7)
  6. Move The Movie Clip In Flash(2)
  7. Your Thoughts On Free Domain Offer!(8)
  8. How To Add "copy To" And "move To" To Right Click(1)
  9. How To Move On With Crushes?(8)
  10. S & M M & M Style(14)
  11. Phpbb Forum Move From One Database To Another(2)
  12. Broadband Over Power Line Standard Coming(21)
  13. File-sharers Move Away From Bittorrent ..(10)
  14. Free Pictures(5)
  15. Is It Possible To Move Only Part Of A Mysql Database(4)
  1. What Should Be The Next Move?(2)
  2. Blog On-the-move With Google And Sony Ericsson(0)
  3. Move Top Banner To Bottom Or Content On Main Page(5)
  4. Error Using "move_uploaded_file()"(4)
  5. How Does One Terminate Their Account(4)
  6. Real Reason Behind Apple's Move(6)
  7. Add Copy To And Move To Functions To Right Click Menu(3)
  8. Making Text Move Or Scroll In Adobe Photoshop(3)
  9. Photoshop Arena Move Requested(1)
  10. A Marquee Question(2)
  11. make a move!(2)
  12. how to move multiple files to a dir(6)
  13. reseller account! do i need to move to new server?(5)
  14. cannot move to new DNS within 24 hours(0)
  15. About the Move(0)


 



- Lo-Fi Version Time is now: 25th July 2008 - 09:20 PM