Adobe Community
All community
This category
This board
Knowledge base
Users
cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results forÂ
ShowÂ
 onlyÂ
|
Search instead forÂ
Did you mean:Â
Global community
Language:
Deutsch
English
Español
Français
Português
日本語コミュニティ
Dedicated community for Japanese speakers
í•œêµ ì»¤ë®¤ë‹ˆí‹°
Dedicated community for Korean speakers
Sign In
Exit
Home
ColdFusion
Discussions
cffile delete
Home
ColdFusion
Discussions
cffile delete
0
Upvote
cffile delete
Guest
/t5/coldfusion-discussions/cffile-delete/td-p/615957
Apr 07, 2007
Apr 07, 2007
Copy link to clipboard
Copied
hi i have a cfile deletewhich works on a schedule task, when there is no file there i get an error,
is there a way of using cfif to determine if the file is present ?
ie if file is present, run delete code
TOPICS
Advanced techniques
Views
254
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
2 Replies
2
Jump to latest reply
Newsgroup_User
LEGEND
,
/t5/coldfusion-discussions/cffile-delete/m-p/615958#M57616
Apr 07, 2007
Apr 07, 2007
Copy link to clipboard
Copied
<cfif fileexists(fullpathtofile)>
you can get fullpathtofile, which has to be ABSOLUTE path, with
#expandpath("relativepathtofile")#
--
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Dan_Bracuk
LEGEND
,
/t5/coldfusion-discussions/cffile-delete/m-p/615959#M57617
Apr 07, 2007
Apr 07, 2007
Copy link to clipboard
Copied
LATEST
Cold fusion has an isDefined function. I'm not sure, they might even have an isFile function.
Or, you could use cftry/cfcatch.
Votes
0
Upvote
Translate
Translate
Report
Report
Follow
Report
More
Reply
Reply
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Post Reply
Preview
Exit Preview
never-displayed
You must be signed in to add attachments
never-displayed
Â
Resources
Documentation
ColdFusion User Guide