List Files via API

Description

Lists files and folders in the specified directory.

Overview

This script lists files and folders in the specified directory. The operator can optionally apply a wildcard filter and chose whether or not to recursively search through subdirectories.

Arguments

Parameter Type Description
Path string The path to a file or directory.
Recurse bool True to recursively list files and folders in subdirectories.
Filter string A wildcard filter to identify which file system entries to select.

Dependencies

  • None

Operating Systems

  • Windows
  • Linux
  • Mac

Example Output

[
  {
    "Length": 524288,
    "PSIsContainer": false,
    "Extension": ".sqlite",
    "CreationTimeUtc": "2022-01-03T21:42:34.1395221Z",
    "LastAccessTimeUtc": "2024-01-25T04:52:57.555101Z",
    "LastWriteTimeUtc": "2024-01-25T04:52:57.555101Z",
    "FullName": "C:\\Users\\helpdesk\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\96ihc82a.default-release\\cookies.sqlite",
    "Session": {
      "MachineId": "dfec7175a6a62757d83b93794df767d5acfadb82",
      "SessionId": "324557e28ddd4ac89d0df41e9bb6a712",
      "BuildId": "576c5025f1754fdabb6ff8e7d050caad",
      "FQDN": "DESKTOP-LMCH70V",
      "IP": "::ffff:192.168.1.101",
      "OS": "Windows 10.0.19045",
      "Username": "DESKTOP-LMCH70V\\helpdesk",
      "PID": 5652,
      "Path": "C:\\Users\\helpdesk\\Desktop\\Workspace\\576c5025f1754fdabb6ff8e7d050caad-csharp-load-module.exe"
    }
  }
]
Scroll to Top