Thanks everyone for your help! I didn't even know directoryexists()
existed...I guess I should finish reading the book! :)
Greg Z
-----Original Message-----
From: Howie Hamlin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 9:02 AM
To: Fusebox
Subject: Re: Check for dupes...Problem
Try:
DirectoryExists()
Returns YES if the directory specified in the argument does exist;
otherwise, it returns NO.
See also FileExists.
Syntax
DirectoryExists(absolute_path)
absolute_path = Any absolute path.
Regards,
Howie Hamlin - inFusion Project Manager
On-Line Data Solutions, Inc.
www.CoolFusion.com
631-737-4668 x101
inFusion Mail Server (iMS) - the World's most configurable mail server
Get your free copy of iMS POST-SE Server from CoolFusion!
----- Original Message -----
From: "Greg Zentkovich" <[EMAIL PROTECTED]>
To: "Fusebox" <[EMAIL PROTECTED]>
Sent: Thursday, February 01, 2001 1:31 PM
Subject: Check for dupes...Problem
> 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