Directory

Read-NetstorageDirectory

Synopsis

Download a directory from NetStorage.

Syntax

Read-NetstorageDirectory [-Path] <String> [-Prefix <String>] -OutputDirectory <String> [-StartPath <String>] [-EndPath <String>] [-MaxEntries <Int32>] [-Encoding <String>] [-SlashBoth] [-AuthFile <String>] [-Section <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
Read-NetstorageDirectory [-Path] <String> [-Recurse] -OutputDirectory <String> [-StartPath <String>] [-EndPath <String>] [-MaxEntries <Int32>] [-Encoding <String>] [-SlashBoth] [-AuthFile <String>] [-Section <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

Downloads all files found in a given NetStorage path, either with a single top-level directory or recursively into all child folders. NetStorage folder structure is replicated locally.

Parameters

-AuthFile

A location of your NetStorage auth file. Defaults to ~/.nsrc, but environment variables will take precedence.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Encoding

A specific encoding to use when requesting a response, for example, utf-8.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-EndPath

A complete path to the last object to return in the list response. All other objects that exist after the noted path are left out of the response.

The zero 0 character exists in place of the trailing slash to accommodate NetStorage directory logic. As a result, the list will display everything up to, and including the last object in the path and possibly a path named [path]0 if one exists.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxEntries

A limit on the number of entries returned.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OutputDirectory

The path to the directory in which to place the new .nsrc file. Defaults to ~/.nsrc.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Path

A path of your directory within the NetStorage group.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Prefix

Lists files whose names begin with the specified prefix.

Type: String
Parameter Sets: dir
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Recurse

Uses the list action instead of dir and recurses into child directories.

Type: SwitchParameter
Parameter Sets: list
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Section

The section name in your EdgeGrid resource file to retrieve authentication credentials from. Defaults to default.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SlashBoth

Sets an additional slash option to both.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-StartPath

The first file in the directory whose name is greater than or equal to this value. This value is appended to the prefix if that field is also included.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Related Links

User Guide: Overview