Scan Folder

efassettaefassetta Member Posts: 53
Hello,

i need to scan a folder to obtain all filename contained.

I try using the 'Windows Script Host Object Model' Automation (as shown below), but the system gives an error on the Item method.

Fold := FSO.GetFolder('c:\aaa');
GruppoFiles := Fold.Files;
MESSAGE(FORMAT(GruppoFiles.Count));
FOR I := 1 TO GruppoFiles.Count DO
BEGIN

FileChk := GruppoFiles.Item(I);
MESSAGE(FileChk.Name);
END;

Thank's a lot

Comments

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    You don't need Windows Script Host. Take a look at the table File (ID 2000000022). If you set a filter on field Path the table shows all files in there.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.