• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

FileExists

Explorer ,
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

This question was posted in response to the following article: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7c66.html

Views

1.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 26, 2012 Jun 26, 2012

Copy link to clipboard

Copied

I just learned that fileExists() also works with a URL and can validate that a remote resource exists.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 02, 2012 Jul 02, 2012

Copy link to clipboard

Copied

fileExists always returns a false for me - even when the file and path are correct. Anyone have any ideas on this one?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 02, 2012 Jul 02, 2012

Copy link to clipboard

Copied

@Balddog4: Does the following return YES or NO for you?

writeOutput(fileExists("http://upload.wikimedia.org/wikipedia/commons/thumb/3/30/Googlelogo.png/250px-Googlelogo.png"))

Thanks,

-Aaron

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

Thanks, Aaron.  It returned NOYES

I did some research, and it does look like fileExists had/has a bug with only returning a False/No response.  I wasn't sure if it had been fixed or if there was a workaround.  I was curious if the original poster had success with this tag.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

I did some research, and it does look like fileExists had/has a bug with only returning a False/No response.

Really?  Where did you read this?

Do you mean "in general" or "when using a URL as an argument"?

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

fileExists always returns a false for me - even when the file and path are correct.  Anyone have any ideas on this one?

I suspect it's because the user the CF service is running as doesn't have permissions to see the file you are testing.

Or the path actually isn't correct.

What's an example of how you're using using?

NB: it's bad form to ask a different question on someone else's thread.  You should start your own thread.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

It could be a permissions issue.  I'll look into that.

Back 15 years ago, there were only a handful on the forums.  I'm not sure when the new forum etiquettes came to be, but I was not aware that it was not appropriate to respond to a common thread.  Actually, at one point, it was encouraged on some forums so as not to have so many redundant and loose threads .  I can repost this on a new topic if preferred.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

Back 15 years ago, there were only a handful on the forums.  I'm not sure when the new forum etiquettes came to be,

It's always been the case on any forum anywhere.  It's the forum equivalent of walking up to someone else's conversation and changing the subject.

It's not a big issue at all, I just meant it as a reminder, but it's always been "etiquette" on any assistance forum I have encountered.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

Thanks for letting me know, Adam.  I was oblivous and certainly don't want to add to a forum faux paus. 

I see now what it's so important.  I need to be able to reply that it was resolved, etc.  Thanks for the tip!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jul 03, 2012 Jul 03, 2012

Copy link to clipboard

Copied

LATEST

It was a permissions issue.  Thanks so much, Guys!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation