Automatically create folder with ColdFusion
October 9, 2008
Leave a comment
In these days, one of our section called “Post N’ Share” needed to save users’ uploaded filesĀ into folder day by day. Make a short, when user upload one file on 7th Oct 2008 we need to create automatically blank folder named as “070102008″ and saved uploaded files into this folder. If we do like that, we can easily check how many users upload how many files day by day. And, when we want to migrate/erase such files, we can easily do it. Here is coding:
<cfset foldername = #dateformat(now(), “ddmmyyyy”)#>
<cfset location = “E:/uploadedphoto/”>
<cfset vDir = “#location##foldername#”>
<cfset NumberOfFilesToCreate = 100000>
<cfdirectory action=”CREATE” directory=”#vDir#”>

