You can also try the Automation object Microsoft Scripting Runtime. It contains a COM object called the FileSystemObject. This gives you full control of directory/file queries and file/directory management. It contains a method called FileExists, among many other useful methods.
EXISTS (File)Usethisfunction to determine if a file exists.[Ok:=]File.EXISTS(Name)OkData type:booleanThisreturn value tells you whether ornot the file exists.Ok will be...If the file...
TRUE Exists
FALSE Doesnot exist
FunctionFExist(pPath:Text[1000]):boolean;varFileList: record 2000000022;beginFileList.SETRANGE(Path, pPath);FileList.SETRANGE("Is a File",true);FileList.SETFILTER(Name,'*.txt');exit(FileList.FIND('-'));end;
Code was written from the scratch. Can be there some mistakes... 8)
Comments
Arhontis
https://forum.mibuso.com/search
Arhontis
https://forum.mibuso.com/search
Code was written from the scratch. Can be there some mistakes... 8)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.