I'd lile to sort a csv in powershell that looks like this:
0.980242;DATABASE_PICTURES/P1040793.JPG
0.167471;DATABASE_PICTURES/P1040805.JPG
0.133792;DATABASE_PICTURES/P1040808.JPG
0.616142;DATABASE_PICTURES/P1040819.JPG
0.0485409;DATABASE_PICTURES/P1040825.JPG
0.17998;DATABASE_PICTURES/P1040826.JPG
0.0428832;DATABASE_PICTURES/P1040837.JPG
0.713708;DATABASE_PICTURES/P7020228.JPG
1;DATABASE_PICTURES//P7020229.JPG
I want to sort the list from highest to lowest number in the first column -->
1;DATABASE_PICTURES//P7020229.JPG
0.980242;DATABASE_PICTURES/P1040793.JPG
0.713708;DATABASE_PICTURES/P7020228.JPG
0.616142;DATABASE_PICTURES/P1040819.JPG
and so on
I tried this script
Import-CSV C:\xampp\htdocs\results\result.csv -Header ('foo', 'bar') -delimiter ';' | Sort-Object foo
but it just doesn't do anything. I've also researched half the internetz, but none of the given codes work or make sense to me. Could somebody give me a hint?