Mar 20, 2002 #1 sknyppy Programmer Joined May 14, 1999 Messages 137 Location US Does anyone have a little handy script that will rename an uploaded file if it already exists? I want to rename it using the original filename and append a deptID to make it unique. Would this be done using a series of cfcatches? Thanks, Dave
Does anyone have a little handy script that will rename an uploaded file if it already exists? I want to rename it using the original filename and append a deptID to make it unique. Would this be done using a series of cfcatches? Thanks, Dave
Mar 21, 2002 #2 Guest_imported New member Joined Jan 1, 1970 Messages 0 Hey, give this a try... <cfset File=#form.file#> <CFIF FileExists(#File#)> <CFFILE ACTION="Rename" source="#File#" destination="#File##deptID#"> </cfif> good luck! AP Upvote 0 Downvote
Hey, give this a try... <cfset File=#form.file#> <CFIF FileExists(#File#)> <CFFILE ACTION="Rename" source="#File#" destination="#File##deptID#"> </cfif> good luck! AP