| | |
Renaming FTP upload
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2004
Posts: 8
Reputation:
Solved Threads: 0
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#"
>
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
- Automating an FTP upload (Shell Scripting)
- FTP problems (Linux Servers and Apache)
- I can't make my FTP work (Growing an Online Community)
- FTP Upload Setup (Windows NT / 2000 / XP)
Other Threads in the ColdFusion Forum
- Previous Thread: session variable undefined in MX 6.1, works in CF 5
- Next Thread: Report Builder Embedding HTML
| Thread Tools | Search this Thread |





