|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
||||
|
||||
|
Check for file
Hello,
What I'm TRYING (and failing) to do is very simple, check a directory for XXX file. I know the name of the file, and I know the directory. I don't want to do a listing of the directory and then check the list, that would be a huge load on the server... <cfset xxx = "somefile"> <cfset yyy = "someotherfile"> <cfif XXX file exists> <cffile copy XXX to YYY> <cfelse> Sorry the file you are trying to copy does not exist. </cfif> I have the cffile line of code, but not the CFIF statement. Any help would be greatly appreciated! -Matt
__________________
Forget Milk! Gotspy? www.gotspy.com |
|
#2
|
|||
|
|||
|
Why not use fileExists()?
<cfif fileExists( absolute_path_to_file )> ... </cfif> |
|
#3
|
||||
|
||||
|
DING! Pull me out of the oven! I'M DONE!!!
Thanks kiteless, I knew there HAD to be some very simple way to do this... I searched through my code book and the internet for a few hours yesterday... Thanks! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Check for file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|