A great combination I got from the documentation is...
<cfif FileExists(ExpandPath(somefile.xyz))>
Yeah got the file.
<cfelse>
Boo, file does not exist.
</cfif>
The expandpath function returns the full, device correct path of any
relative or absolute file reference, including "*.*", "/", "\",
"myfile.htm", ect. Makes for much more portable code, then hard coding
paths into the FileExists function.
--------------
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA
-----Original Message-----
From: Bryan Stevenson [mailto:[EMAIL PROTECTED]
Sent: Friday, May 30, 2003 10:21 AM
To: CF-Talk
Subject: Re: IF File Exist
Take a look at the FileExists() function ;-)
<cfif FielExists(absolute path on server to file)>
do something
<cfelse>
do something else
</cfif>
Cheers
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
t. 250.920.8830
e. [EMAIL PROTECTED]
---------------------------------------------------------
Macromedia Associate Partner
www.macromedia.com
---------------------------------------------------------
Vancouver Island ColdFusion Users Group
Founder & Director
www.cfug-vancouverisland.com
----- Original Message -----
From: "Paige Chandler" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 30, 2003 10:10 AM
Subject: IF File Exist
> Hello All,
>
> How can I determine if a file exist? Sort of like:
>
> <CFIFFILE([EMAIL PROTECTED])>
> do
> <CFELSE
> do
> </CFIFFILE>
>
> Thanks.
>
> Have a great day.
>
> Regards,
>
> Paige
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more
resources for the community.
http://www.fusionauthority.com/ads.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4