if nothing else, do a list on the supposed directory name inside a cftry 
and inside the cfcatch, create the dir.


At 08:31 AM 2/1/01 -1000, you wrote:
>Does anybody know how to check for duplicate directory names?
>
>
>If it helps...
>I'm creating unique directories using a random number that is associated
>with a user. Which all their uploaded
>files will be dump into. What I am trying to figure out is how to check is
>the directory already exists, if it
>does, then skip the "create directory" section and just upload more files...
>
>
>---------------------snip-----------------------------------------------
>
><cfoutput>
><cfset unique="UID" & #Round(RandRange(0,2000000))#>
>
><!--- Need a check for dupes here --->
><cfdirectory action="create" directory="#request.hardpath##unique#">
>
><cffile action="UPLOAD"
>                 accept="application/*,text/*"
>                 filefield="uploadfile1"
>                 nameconflict="MAKEUNIQUE"
>                 destination="#request.hardpath##unique#">
></cfoutput>
>
>---------------------snip-----------------------------------------------
>
>if a directory(name) does not already exists
>         create one
>otherwise just upload files into existing...
>
>
>Hope this makes sense...
>
>Greg Z
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to