ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: luvnrocs on September 10, 2021, 05:04:52 PM

Title: Sort CSV output
Post by: luvnrocs on September 10, 2021, 05:04:52 PM
I know there's a way to sort the columns by tag name or description but is there a way to sort the CSV output rows by a certain column? For example I want to sort the SourceFile column so that the filenames are in order rather than the random order I see now in my output. I know I can do this later in Excel but I'm trying to save a step if possible.
Title: Re: Sort CSV output
Post by: StarGeek on September 10, 2021, 09:24:07 PM
You can't specifically order the SourceName column, as that is not a real tag, just a special field for the -csv option (https://exiftool.org/exiftool_pod.html#csv-CSVFILE), but you can use the -FileOrder option (https://exiftool.org/exiftool_pod.html#fileOrder-NUM---TAG) to order the list on any tag(s) you would like.