FilterFiles

Top  Previous  Next

Prototype

 

FileList:=FilterFiles(PathFile)

 

Description

 

Returns the directory file list

 

Parameters

 

PathFile: String corresponding to the directory path and files extension.

 

Returned value

 

FileList: String containing the directory file list .

 

Notes

 

None.

 

Example

 

// It retrieves all file content in a directory

FileList:=FilterFiles('c:\test\*.txt');

 

// It verifies if file exists

Existed:=FileExists ('c:\first.txt');

 

// It creates a file

If Existed=False Then CreateFile('c:\first.txt');

 

// It opens file

OneFile:=TextFileOpen('c:\first.txt', true);

 

// It writes a string in file

TextFileWrite(OneFile,FileList);

 

// It closes the file

TextFileClose(OneFile);