FileExists() - determine whether a file exists
FileExists.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FileExists function example: how to determine whether a file exists</title>
</head>
<body>
<h2 style="color:Crimson">FileExists Function Example</h2>
<cfset File1="C:\ReadMe.txt">
<cfset File2="C:\MyFolder\ReadMe.txt">
<cfoutput>
<b>
File1: #File1#
<br />
File1 Exists?: #FileExists(File1)#
<br /><br />
File2: #File2#
<br />
File2 Exists?: #FileExists(File2)#
</b>
</cfoutput>
</body>
</html>
- CFAJAXIMPORT to specify Google map API Key in ColdFusion
- ColdFusion CFscript - Invoke a component in script
- How to cache query data in session scope in ColdFusion
- How to use NOT EQUAL operator in cfif condition in ColdFusion
- How to use NEQ operator in cfif condition in ColdFusion
- ColdFusion - How to use IS NOT operator in cfif conditional processing
- How to use variable prefixes in ColdFusion
- How to get coldfusion DataSource list programmatically
- How to dump and get output server variables in coldfusion
- How to create a border type layout in ColdFusion