Hello
I have a text variable containing the UNC path to a file and that I pass to the HYPERLINK function and this opens the file as expected. I want to alter the code so that it first checks that the file exists before attempting to open it. To do this, I pass the same text variable to the EXISTS function but this does not find the file. Any suggestions? Thanks. Sample code below.
UNCPath := '\\servername\sharename\filename.tif';
IF EXISTS(UNCPath) THEN
HYPERLINK(UNCPath)
ELSE
ERROR('Cant find file');
Many Thanks
0
Answers
And if you are using an earlier version of NAV which doesn't have this function then you can add it in...
Franz Kalchmair, MVP
Alias: Jonathan Archer
please like / agree / verify my answer, if it was helpful for you. thx.
Blog: http://moxie4nav.wordpress.com/
That looks like it's checking to see if a directory exists, not a file. My original post above should work fine for a file on a UNC path.