Topic "How to Get dateCreated of File ?"

Author Message
vpnjain1991
[View user's profile]

Joined: 2017-02-10
Posts: 1
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 ????
}
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26331
Location: Prague, Czechia
WinSCP does not expose the creation timestamp.

But it does expose the last modification timestamp: RemoteFileInfo.LastWriteTime
https://winscp.net/eng/docs/library_remotefileinfo#lastwritetime
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License