How to find files that were created more than a year ago?


I am tasked to find all the files in a document library that has creation date is older than a year.  Now this is a modern Team site, and files were copied to this library using ShareGate. When I say creation date, I mean the original creation date of the file, not the date that the files were copied to SP. 


Now, trying to find it using PowerShell, I am doing this:

$afile = Get-PnPListItem -id 17 -List 3db40bc0-9bcc-88xx-a7e0-ab7b9e0910a1


FieldValues has "Created" and "Created_x0020_Date". Both have same value.  


My question is, can I rely on this data and assume that "Created" or "Created_x0020_Date" has actually the original file creation date? 


1 Reply
Hi, Sharegate will maintain the metadata info while copying files from the source to destination. You can rely on the tool and for sure you can use the Created field info as the file created date not the copied date. If you are not convinced, you can compare the source and the destination for few random files.

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...