Hi
Thank's I find the System.IO - but got Message : ...
".....Could not find a part of the path 'S:\Sapalogic\XMLData\' "
I try both 2.0.0.0 and 4.0.0.0 (x64)
I can use another code from mibuso - Folder.GetFiles - see code below - it Works - but this code is not allowed to run in job-Queue at NAS.
error message "translated" : "....Client revocation call is not supported at Microsoft Dynamics NAV Server"
------------
I got error message with this code
MyPath := 'S:\Sapalogic\XMLData\';
DirectoryInfo := DirectoryInfo.DirectoryInfo(MyPath);
List := DirectoryInfo.GetFiles('*.xml'); // ('*.xml');
enumerator := List.GetEnumerator();
// Once we have a list of enumerator class then we can loop through each object
WHILE enumerator.MoveNext DO BEGIN
FileInfo:= enumerator.Current();
CLEAR(FileCopy);
FileCopy.Name := FileInfo.Name;
FileCopy.Ref := 'ENUMERATOR';
FileCopy.INSERT(TRUE);
END;
{
This code works
MyPath := 'S:\Sapalogic\XMLData\';
Prefix := 'ITEM';
Obj := Folder.GetFiles(MyPath,Prefix + '*.xml');
Lst := Lst.List;
Lst.AddRange(Obj);
IF Lst.Count > 0 THEN BEGIN
FOR NumFiles := 0 TO Lst.Count - 1 DO BEGIN
CLEAR(FileCopy);
// MESSAGE(FORMAT(Lst.Item(NumFiles)));
FileCopy.Name := FORMAT(Lst.Item(NumFiles));
FileCopy.Ref := 'Folder.GetFiles';
FileCopy.INSERT(TRUE);
END
END;
}