Get-FilesChildItem
List Folders by Path.
Syntax
List (Default)
Page
Continuation
Description
List Folders by Path.
Without -Page or -Continuation, the command writes each folder of every page, loading one page at a time as the pipeline consumes them. -First and -Skip bound what it writes, and stopping the pipeline early, as Select-Object -First does, loads no further page. A failure on any page stops the command, so a partial listing is never taken for a complete one.
Examples
Example 1: List all folders
Writes every folder, loading one page at a time as the pipeline consumes them.
Example 2: Get one page at a time
Writes the first page as a FilesPage object, then the next page from its continuation.
Parameters
-Cursor
Send cursor to resume an existing list from the point at which you left off. Get a cursor from an existing list via the X-Files-Cursor-Next header or the X-Files-Cursor-Prev header.
- Type:
System.String - Parameter sets:
List,Page
-PerPage
Number of records to show per page. (Max: 10000, 1,000 or less is recommended).
- Type:
System.Int64 - Parameter sets:
List,Page
-Path
Path to operate on.
- Type:
System.String - Parameter sets:
List(required, position 0),Page(required, position 0)
-PreviewSize
Request a preview size. Can be small (default), large, xlarge, or pdf.
- Type:
System.String - Parameter sets:
List,Page
-SortBy
Search by field and direction. Valid fields are path, size, modified_at_datetime, provided_modified_at. Valid directions are asc and desc. Defaults to {"path":"asc"}. Give a hashtable or PSCustomObject; keys keep their case and values their types.
- Type:
System.Collections.IDictionary - Parameter sets:
List,Page
-Search
If specified, will search the folders/files list by name. Ignores text before last /. This is the same API used by the search bar in the web UI when running 'Search This Folder'. Search results are a best effort, not real time, and not guaranteed to perfectly match the latest folder listing. Results may be truncated if more than 1,000 possible matches exist. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
- Type:
System.String - Parameter sets:
List,Page
-SearchCustomMetadataKey
If provided, the search string in search will search for files where this custom metadata key matches the value sent in search. Set this to * to allow any metadata key to match the value sent in search.
- Type:
System.String - Parameter sets:
List,Page
-SearchAll
Search entire site? If true, we will search the entire site. Do not provide a path when using this parameter. This is the same API used by the search bar in the web UI when running 'Search All Files'. Search results are a best effort, not real time, and not guaranteed to match every file. This field should only be used for ad-hoc (human) searching, and not as part of an automated process.
- Type:
System.Boolean - Parameter sets:
List,Page
-WithPreviews
Include file previews?
- Type:
System.Boolean - Parameter sets:
List,Page
-WithPriorityColor
Include file priority color information?
- Type:
System.Boolean - Parameter sets:
List,Page
-Type
Type of objects to return. Can be folder or file.
- Type:
System.String - Parameter sets:
List,Page
-ModifiedAtDatetime
If provided, will only return files/folders modified after this time. Can be used only in combination with type filter. Give a DateTime from Get-Date, a DateTimeOffset, or ISO 8601 text with an offset such as 2026-01-31T14:00:00Z.
- Type:
System.DateTimeOffset - Parameter sets:
List,Page
-Connection
The connection to use, from Connect-FilesAccount. Defaults to the connection of the -InputObject or -Continuation given, and otherwise to the current runspace's default connection.
- Type:
FilesCom.PowerShell.FilesConnection - Parameter sets:
(All)
-WorkspaceScope
Runs this command's requests in this workspace, including workspace 0, instead of the connection's or, for an -InputObject, instead of the workspace the object was read in. The connection and the object are unchanged.
- Type:
System.Int64 - Parameter sets:
(All)
-NoWorkspaceScope
Runs this command's requests in no workspace, even if the connection has one. The connection itself is unchanged.
- Type:
System.Management.Automation.SwitchParameter - Parameter sets:
(All)
-Page
Writes the first page as one FilesPage object instead of writing every object. Pass its Continuation to -Continuation for the next page.
- Type:
System.Management.Automation.SwitchParameter - Parameter sets:
Page(required)
-Continuation
Writes the page after the one this continuation came from, as one FilesPage object. A continuation loads its page once and belongs to the command, query and connection that produced it.
- Type:
FilesCom.PowerShell.FilesContinuation - Parameter sets:
Continuation(required)
-First
Writes at most this many objects. Once they are written, no further page is loaded.
- Type:
System.UInt64 - Parameter sets:
(All)
-Skip
Skips this many objects before writing any. The skipped objects are still loaded.
- Type:
System.UInt64 - Parameter sets:
(All)
-IncludeTotalCount
Writes a total count first. Files.com does not report list totals, so the count is marked as unknown.
- Type:
System.Management.Automation.SwitchParameter - Parameter sets:
(All)
Common Parameters
This cmdlet supports the PowerShell common parameters, such as -Verbose and -ErrorAction.
Inputs
None. The command takes no pipeline input.
Outputs
FilesCom.PowerShell.Models.RemoteFile: the remote file as Files.com returned it.FilesCom.PowerShell.FilesPage`1: with-Pageor-Continuation, one page of results and the continuation for the next.
Notes
Failures are written as error records with IDs such as Files.NotFound or Files.Authentication. Run Get-Help about_FilesCom for connections, paging, errors and previewing changes.