Cloudberry Powershell Snap-In: Syncing Files based on LastWriteTime

I am trying to sync a large number of files from a folder on the server into a cloudberry bucket for all files where the date today is the same as the last modified date for that file.

This syncs successfully, when I do something like where-object -filter *, but with $PSItem.LastWriteTime –ge $date it does not work. I think it must be the $PSItem.LastWriteTime that is wrong as it returns blank instead of a date. Any idea how to fix the filter?

I have attempted to find the solution online, but none of the solutions works for a `$temp` object of type `CloudBerryLab.Explorer.PSSnapIn.Object.CloudFolder`.

Add-PSSnapin CloudBerryLab.Explorer.PSSnapIn
Set-CloudOption -PathStyle VHost
$date = Get-Date -Hour 0 -Minute 00 -Second 00
$s3 = Get-CloudS3Connection -Key XXXX -Secret XXXX
$source = Get-CloudFilesystemConnection | Select-CloudFolder -Path "//server1/XXXX/XXX"
$temp = $s3 | Select-CloudFolder -path "bucket/XXXX/"
$source | Where-Object –Filter { $PSItem.LastWriteTime –ge $date} | Copy-CloudSyncFolders $temp

Parents
No Data
Reply Children
No Data