943,580 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Unsolved
  • Views: 4698
  • ColdFusion RSS
May 13th, 2005
0

Renaming FTP upload

Expand Post »
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#"
>
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cfnut is offline Offline
8 posts
since Jul 2004
Jul 6th, 2005
0

Re: Renaming FTP upload

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.
Reputation Points: 10
Solved Threads: 0
Junior Poster in Training
bkendall is offline Offline
69 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: session variable undefined in MX 6.1, works in CF 5
Next Thread in ColdFusion Forum Timeline: Report Builder Embedding HTML





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC