Tutorial

Getting Started with Macros

Macro Editor

User Interface

Menus and Toolbar

Editing Macros

Macro Debugging

How To

Using variables

Finding and modifying objects

Creating new page content

Asking for user input

Storing persistent data

Using binary data

Sorting objects

Macro menus

Bulleted and numbered lists

Accessing the file system

Sample Macros

Concepts

Expressions

Objects

Properties

Variables

Data Types

Arrays

Functions

Literals

Operators

Comments

Last updated on: February 02, 2025
Also available as a single HTML file

Onetastic Macro Documentation > Functions > File System Functions > FileSystem_GetFolderEntries

FileSystem_GetFolderEntries

Returns the list of files and folders inside a given folder that matches the optional pattern provided. If no pattern is provided, all files and folders are returned. The result does not contain special folder entries "." and "..".

Syntax

Array<File|Folder> FileSystem_GetFolderEntries(
	Folder|String folder, 
	String pattern)

Parameters

Folder|String folder
Folder to search files in. This can either be a Folder object or a String that contains the full path to the folder.
String pattern (optional)
The pattern to look for in file and folder names.

Examples

// Get all PNG files from c:\temp $images = FileSystem_GetFolderEntries("c:\\temp", "*.png") foreach ($image in $images) // Do something with the image

Reference

Statements

Hierarchy Objects

Page Objects

Other Objects

Functions

Array Functions

Color Functions

Data Store Functions

Date/Time Functions

Dialog Box Functions

File System Functions

Macro Execution Functions

Macro Menu Functions

Object Functions

Special Functions

String Functions

Window Functions