Can I use FileExists to find all files in a DIR

Hi, if I have a Directory C:\MyFiles, how can I from Navision see 1) How many files there are in this directory 2) Which files there are in this directory Michael

Hi Michael, you can use the internal table 2000000022::File. Create a new form to see this table. Set the filter in ‘SourceTableView’ on your folder and you will see all files in the folder. NEW Uops! I should better first read then answer.

Name	DataType	Subtype	Length
FileSystem	Record	File	

FileSystem.SETRANGE(FileSystem."Is a file",TRUE);
IF FileSystem.FIND('-')then begin
  i:= i + 1;
  Message(Filesystem.Name+' File No.:'format(i));
 until FileSystem.Next = 0;

If you want to filter on a file format (e.g. mp3) use this:


bye Andre