Jump to content
Sign in to follow this  
normanicus

Testing if a file exists

Recommended Posts

Hi,

Is it possible to test if a file exists? I've got a client who wants to have an image library. Some images are JPGs, others TIF, etc. What I would like is a calculation like this:

Case(

FileExists(itemName & "JPG); $$image_path & itemName & *.JPG);

FileExists(itemName & "TIF); $$image_path & itemName & *.TIF)

)

Hope that makes sense,

Norman

Share this post


Link to post
Share on other sites

I am not sure what you plan to do with the result, but a file reference can contain several alternative paths separated by carriage returns. So something like

filepath & filename & ".jpg" & ¶ & filepath & filename & ".tif"

should work for most uses.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.