Link to home
Start Free TrialLog in
Avatar of micba
micba

asked on

How can I know if a remote file exist?

Hello,
How can i check in Coldfusion if exist the file: "www.mysite.com/pic.jpg"?
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of mosphat
mosphat

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Do u mean remote as in on ur remote server - or ur talking abt some other site altogether ?
Avatar of micba
micba

ASKER

Thanks mosphat.
Very good.
You could use the FileExists function.
In the CFIF tag, call the FileExists function and use the ABSOLUTE PATH for the file.
Although I've never actually gotten this to work properly, it's supposed to work.

<cfif FileExists(idPhoto)>
holosimexchange,

FileExists() only works for local files, like C:\blah.txt. You just need to put in the full path to the file. I don't see how you cannot get it to work properly...