tomohulk / WinSCP

WinSCP PowerShell Wrapper Module
GNU General Public License v3.0
151 stars 29 forks source link

Allow -modified switch for the Get-WinSCPChildItem #144

Closed MarkF26 closed 1 year ago

MarkF26 commented 1 year ago

Please fill in the following fields, replacing the values inside the brackets {{ }}.

Issue Description

The New-WinSCPTransferOption PowerShell cmdlet contains filemask that allows specifying date criteria for upload and downloads. This feature does not exist in the Get-WinSCPChildItem. Having this feature allows listing the content of the remote SFTP directory based on file modification date(s).

Example

Get-WinSCPChildItem -modified >= Today Get-WinSCPChildItem -modified > 2022-12-27

Expected Output

Get-WinSCPChildItem output

Actual Output

WinSCP-PowerShell Version

Version Name Repository Description


5.17.10.0 WinSCP PSGallery PowerShell Module Wrapper for WinSCP.

Environment

Windows Server 2019 Standard

Name : Windows PowerShell ISE Host Version : 5.1.17763.2931 InstanceId : 5e5e6530-d670-492b-bc59-76d814daaa0f UI : System.Management.Automation.Internal.Host.InternalHostUserInterface CurrentCulture : en-US CurrentUICulture : en-US PrivateData : Microsoft.PowerShell.Host.ISE.ISEOptions DebuggerEnabled : True IsRunspacePushed : False Runspace : System.Management.Automation.Runspaces.LocalRunspace

tomohulk commented 1 year ago

Use the output of Get-WinSCPChildItem and pass it to the Where-Object command. There you can filter on any property you'd like.