Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

vpnjain1991

How to Get dateCreated of File ?

Hi, I'm trying to filter files created today but I didn't find any method in RemoteFileInfo to et date created ?
Any idea how can I get date created of file ?

# Connect
$session.Open($sessionOptions)
Write-Host "Session Connected"

# Download files
$transferOptions = New-Object WinSCP.TransferOptions
$transferOptions.TransferMode = [WinSCP.TransferMode]::Binary
$directory = $session.ListDirectory("/")

foreach ($fileInfo in $directory.Files)
{

// How to get date created of file ????
}