ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: dwlott on June 27, 2024, 07:41:37 AM

Title: The file order changes when using an SDXC drive
Post by: dwlott on June 27, 2024, 07:41:37 AM
Hello again,
Please help me understand why the file order changes when using an SD drive.

With the following command, ExifTool replies with a list sorted by folder and then file.  But with the same command, the file order changed to the modification date when I point the source to a drive the size of my fingernail (SDXC). When using the SDXC drive, I use -fileorder FileName to help return the file order to what it was.

-r
-f
-T
-Directory
-FileName
-Title
E:\mySourceFolder\Euro Time - Testing

 
Title: Re: The file order changes when using an SDXC drive
Post by: StarGeek on June 27, 2024, 10:34:47 AM
What is the file system on the card?

Exiftool doesn't do any sorting of the file order by default. It just uses the order as reported by the file system. With most file systems, they are returned in a sorted fashion, but not all file system do so.  For example, I use Stablebit DrivePool to pool multiple drives into a single virtual drive. The DrivePool program doesn't return a sorted directory listing. Instead, the order is sorted based upon the underlying drive, with each grouping sorted because the underlying files system is NTFS and that returns a sorted listing. So, the file list starts with all the files on drive D:, then drive E:, drive F: etc.
Title: Re: The file order changes when using an SDXC drive
Post by: dwlott on June 27, 2024, 04:02:52 PM
Quote from: StarGeek on June 27, 2024, 10:34:47 AMWhat is the file system on the card?

Exiftool doesn't do any sorting of the file order by default. It just uses the order as reported by the file system. With most file systems, they are returned in a sorted fashion, but not all file system do so.  For example, I use Stablebit DrivePool to pool multiple drives into a single virtual drive. The DrivePool program doesn't return a sorted directory listing. Instead, the order is sorted based upon the underlying drive, with each grouping sorted because the underlying files system is NTFS and that returns a sorted listing. So, the file list starts with all the files on drive D:, then drive E:, drive F: etc.
Okay, that helps me understand that the file system controls the default file order. Thank you for helping me Stargeek. 
From my little bit of testing, the file system that sorts by modification date is exFAT.  The NTFS seemed to sort by file name. 
Title: Re: The file order changes when using an SDXC drive
Post by: StarGeek on June 27, 2024, 04:29:54 PM
Quote from: dwlott on June 27, 2024, 04:02:52 PMFrom my little bit of testing, the file system that sorts by modification date is exFAT.

Good to know. I know about NTFS and I believe Mac's FS does the same, so I was curious as to what was used.