Renaming FTP upload

Reply

Join Date: Jul 2004
Posts: 8
Reputation: cfnut is an unknown quantity at this point 
Solved Threads: 0
cfnut cfnut is offline Offline
Newbie Poster

Renaming FTP upload

 
0
  #1
May 13th, 2005
I would like to rename the users file that they upload to my ftp. I want to add the CustId to the begging of the file name. For example it they select a file called test I want it to be named 223Test in my upload folder on my ftp site.

I uploaded a file called uptest and when my code ran I had two files in my upload folder. One was called uptest and the other was called acff97. So instead of renaming the file it just created a new one. I want to rename the file so that its the custId. Any suggestions?

<cf_fileupload
userid = "test"
password = "test"
filefield = "form.filename"
destination = "/test_com/www/upload"
NameConflict = "MakeUnique">


<cfx_filemanager action ="rename"
userid = "test"
password = "test"
filefield = "form.filename"
source = "/test_com/www/upload/form.filename"
destination = "/test_com/www/upload/#Session.CustId#"
>
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 69
Reputation: bkendall is an unknown quantity at this point 
Solved Threads: 0
bkendall's Avatar
bkendall bkendall is offline Offline
Junior Poster in Training

Re: Renaming FTP upload

 
0
  #2
Jul 6th, 2005
the "MAKEUNIQUE" option of <CFFILE> I believe just generates a random name so that there is not a naming conflict. I think you would have to use some objext variables to add the prefix you want. I have not done this in cf but I know that similar actions can be performed in ASP.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ColdFusion Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC