-
Notifications
You must be signed in to change notification settings - Fork 30
Get WinSCPChildItem
Gets the items and child items in one or more specified locations.
Get-WinSCPChildItem [[-Path] <String[]>] -WinSCPSession <Session> [-Filter <String>] [-Recurse] [-Depth <Int32>] [-Name] [-Directory] [-File] [<CommonParameters>]
Gets the items and child items in one or more specified locations.
PS C:\> Get-WinSCPChildItem
Directory: ./
Mode LastWriteTime Length Name
---- ------------- ------ ----
--------- 6/30/2017 8:50:37 AM ftpDir1
--------- 6/30/2017 8:50:44 AM ftpDir2
--------- 6/30/2017 8:50:52 AM 0 ftpDoc1.txt
--------- 6/30/2017 8:50:52 AM 0 ftpDoc2.txt
PS C:\> $sessionOption = New-WinSCPSessionOption -HostName $env:COMPUTERNAME -Protocol Ftp
PS C:\> New-WinSCPSession -SessionOption $sessionOption
Opened Timeout HostName
------ ------- --------
True 00:01:00 ftp.dotps1.github.io
PS C:\> Get-WinChildItem -File
Directory: ./
Mode LastWriteTime Length Name
---- ------------- ------ ----
--------- 6/30/2017 8:50:52 AM 0 ftpDoc1.txt
--------- 6/30/2017 8:50:52 AM 0 ftpDoc2.txt
PS C:\> Remove-WinSCPSession
It represents a session and provides methods for manipulating remote files over SFTP, SCP or FTP session.
Type: Session
Parameter Sets: Set 1
Aliases:
Required: true
Position: named
Default Value:
Pipeline Input: True (ByPropertyName)
Full path to root remote directory to start enumeration in.
Type: String[]
Parameter Sets: Set 1
Aliases:
Required: false
Position: 0
Default Value:
Pipeline Input: True (ByPropertyName, ByValue)
Windows wildcard to filter files. To select all files, use null.
Type: String
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value: null
Pipeline Input: false
Recurse into subdirectories.
Type: SwitchParameter
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value:
Pipeline Input: false
The amount of directories to recurse.
Type: Int32
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value:
Pipeline Input: false
Gets only the names of the items in the locations.
Type: SwitchParameter
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value:
Pipeline Input: false
Select directory objects only.
Type: SwitchParameter
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value:
Pipeline Input: false
Select file objects only.
Type: SwitchParameter
Parameter Sets: Set 1
Aliases:
Required: false
Position: named
Default Value:
Pipeline Input: false
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
System.String[]
If both -Directory and -File switches are used, return nothing. This mimics the functionality of Get-ChildItem.
Generated by: PowerShell HelpWriter 2017 v2.1.36