Statelake provides functions for working with files, both as File Functions and also as properties and methods for the File Connection object class, found at File Connection Class (FileCon).
Beyond that, you can use Statelake to activate the Windows "FileSystemObject", as a COM object, to access the functionality that it provides.
The following example shows how to use Statelake to interact with the Windows “FileSystemObject”.
Full information is available from Microsoft and other pages on the Internet.
procedure OnMapEvent(var Value:Variant);
var
fso: Variant; // COM objects are declared as type Variant