Sorting image files

I have a folder containing several .jpg files.
I need to sort them by “acquisition date” (in Italian: “data acquisizione”).
How can I write the “Sort-Object” statement?

Welcome back to the forum. :wave:t4: Long time no see.

Why / what for do you need that?
Do you get this property when you run a Get-ChildItem on the folder?

Yes, it’s exactly what I need…

So what’s the issue? I don’t understand your question?

You may (re-)read the help completely including the examples to learn how to use it.

That property will be in the metadata. There is a function available to read the metadata, written by Ed ‘Scripting Guy’ Wilson:

The script is no longer online at the linked location but you can get it from

You can then dot source the script, point it at the folder, and get at the data you need.

. .\Get-FileMetaDataReturnObject.ps1
Get-FileMetaData 'E:\Temp\Pics\' | Sort-Object 'data acquisizione' | Select-Object 'data acquisizione',Filename
1 Like