achitophel Posted October 19, 2007 Posted October 19, 2007 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
IdealData Posted October 19, 2007 Posted October 19, 2007 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.
achitophel Posted October 19, 2007 Author Posted October 19, 2007 Changing the path to a mapped drive has the same result. If it helps, the value returned by troi is "1". Thanks again...
achitophel Posted October 19, 2007 Author Posted October 19, 2007 Strangely enough, i couldnt get that example working but i can achieve the same results using this instead: Left(TrFile_GetFileSize("" ; $imgPath );2) = "$$"
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now