October 19, 200718 yr 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
October 19, 200718 yr 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.
October 19, 200718 yr Author Changing the path to a mapped drive has the same result. If it helps, the value returned by troi is "1". Thanks again...
October 19, 200718 yr Author Strangely enough, i couldnt get that example working but i can achieve the same results using this instead: Left(TrFile_GetFileSize("" ; $imgPath );2) = "$$"
Create an account or sign in to comment