Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6246 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I would like to check if a file exists before performing an operation on it.

I have tried using the troi file plugin's example which modified slightly for me looks like this:

if [Left(External("TrFile-GetDateCreated"; INVENTORY::ImagePath) ; 2 ) <> "$$"]

Set Field [iNVENTORY::ImageExists; "Yes"]

Else

Set Field [iNVENTORY::ImageExists; "No"]

End if

Which unfortunately always returns YES.

INVENTORY::ImagePath is a network path which looks like this "INVENTORYIMAGE.JPG".

If anyone has any idea's, or even another way to check i would appreciate it very much.

Thanks in advance,

Jason

Posted

AFAIK windows will remember a network path after you have closed the window that you opened it in. Same on Macs really.

Can you setup a mapped drive? Then it can be disconnected properly. Bear in mind that the path will need to be augmented with the mapped drive letter.

Posted

Strangely enough, i couldnt get that example working but i can achieve the same results using this instead:

Left(TrFile_GetFileSize("" ; $imgPath );2) = "$$"

This topic is 6246 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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