Hi
I want to find all files in a directory given a specific prefix and extension. I cannot find how to do this in Codeunit 419 "File mangement" Version NAV2013.
There is some code-example at Mibuso using DotNet (se below) - but this code works well running at Client but does not work running at a NAS.
Do you have another example ?
Thank you in advance.
Best regards
odri
Example
Obj := Folder.GetFiles('C:\Temp','*.txt');
Lst := Lst.List;
Lst.AddRange(Obj);
MESSAGE('%1',Lst.Count);
FOR i := 0 TO Lst.Count - 1 DO BEGIN MESSAGE(FORMAT(Lst.Item(i))); END;
Folder DotNet System.IO.Directory.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Lst DotNet System.Collections.Generic.List`1.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' Obj DotNet System.Object.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
*This post is locked for comments