ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old December 16th, 2004, 11:00 AM
mk_senthil mk_senthil is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 45 mk_senthil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 9 m 49 sec
Reputation Power: 4
cffile upload/rename

Here I'm having a problem.

I need to upload .html file only to a directory [FONT=Verdana]undefined and It should be named all the time policies.html, even anybody mistakenly uploaded htm/html file in some other name.

anyhelp??

Reply With Quote
  #2  
Old December 16th, 2004, 02:14 PM
VelvettFogg VelvettFogg is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 34 VelvettFogg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 13 m 46 sec
Reputation Power: 4
Try this ...

Code on the upload form. Must use Enctype=Multipart/Form-data

<form enctype="Multipart/form-data" action="upload_action.cfm" method="post">
File to upload<br>
<input type="file" name="uploadFile">
<br>
<input type="submit" value="Upload File">
</form>

Code on the action page

<cffile action="upload" fileField="UploadFile" destination="D:\yourPath\" nameconflict="overwrite">

<cffile action="move" source="D:\yourPath\#cffile.serverfile#" destination="D:\yourPath\policies.html">

Might work

Reply With Quote
  #3  
Old December 17th, 2004, 11:19 AM
mk_senthil mk_senthil is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 45 mk_senthil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 h 9 m 49 sec
Reputation Power: 4
yeah I got it....

yes It solves my problem and Thanks for your time and help.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > cffile upload/rename


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway