Cool. thanks
I like the way you find the alphabetized directory.
>I do something similar to this, not exactly, but you will see how to
>manipulate it -
>
>I save the files in a directory like:
>d:\website.com\Admin\files\Resumes\A-B\Nick.doc
>Probably better ways to do it - but it isn't bad.
>
>I also store the file info in the database, Name, Type, Description,
>Postedby, etc.
>
>-Nick
>
>
>here is the code:
>
>
><!--- Find the Alphabet Dir --->
><cfset ThisCandName = #Left(FORM.CandidateName, 1)#>
>
> <cfif ListFindNoCase("A,B,C,D",ThisCandName) GTE 1>
> <cfset ThisDirName = "A-D">
> <cfelseif ListFindNoCase("E,F,G,H",ThisCandName) GTE 1>
> <cfset ThisDirName = "E-H">
> <cfelseif ListFindNoCase("I,J,K,L",ThisCandName) GTE 1>
> <cfset ThisDirName = "I-L">
> <cfelseif ListFindNoCase("M,N,O,P",ThisCandName) GTE 1>
> <cfset ThisDirName = "M-P">
> <cfelseif ListFindNoCase("Q,R,S,T",ThisCandName) GTE 1>
> <cfset ThisDirName = "Q-T">
> <cfelseif ListFindNoCase("U,V,W,X,Y,Z",ThisCandName) GTE 1>
> <cfset ThisDirName = "U-Z">
> <cfelse>
> <cfset ThisDirName = "Other">
> </cfif>
>
><!--- Set Directory Name --->
><cfset newDirectory =
>"#SiteRootDir#\Admin\files\Resumes\#ThisDirName#\#FORM.CandidateName#">
><cfset currentDirectory =
>"#SiteRootDir#\Admin\files\Resumes\#ThisDirName#\#FORM.CandidateName#">
>
><!--- Check to see if the Directory exists --->
> <cfif DirectoryExists(#currentDirectory#)>
> <!--- If TRUE then save the file the directory --->
> <cffile
> action="UPLOAD"
> filefield="file_path"
> destination="#newDirectory#"
> nameconflict="MAKEUNIQUE"
> accept="application/pdf, application/msword,
> application/x-stuffit,
>application/x-zip-compressed, application/vnd.ms-excel, application/psd,
>application/ai, application/fhd, application/cdr, application/dwg,
>model/vnd.dwf, application/dwf, application/eps, text/richtext,
>application/x-shockwave-flash, application/octet-stream, image/gif,
>image/jpeg, image/jpg, image/*, text/html, text/txt, text/plain">
>
> <cfelse>
> <!--- If FALSE then create the directory --->
> <cfdirectory action = "create" directory = "#newDirectory#" >
> <!--- NOW save the file --->
> <cffile
> action="UPLOAD"
> filefield="file_path"
> destination="#newDirectory#"
> nameconflict="MAKEUNIQUE"
> accept="application/pdf, application/msword,
> application/x-stuffit,
>application/x-zip-compressed, application/vnd.ms-excel, application/psd,
>application/ai, application/fhd, application/cdr, application/dwg,
>model/vnd.dwf, application/dwf, application/eps, text/richtext,
>application/x-shockwave-flash, application/octet-stream, image/gif,
>image/jpeg, image/jpg, image/*, text/html, text/txt, text/plain">
> </cfif>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1390
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54