Overview:
How can I edit the inode number (ls -i /path/to/file) of certain files after file creation on a FAT-32 filesystem?
Why I'd like to do this:
During the holiday season I encountered a problem with jpg images on USB flash drives showing up in some weird order on a Philips TV. After all, it turned out, that the TV just recognises the file serial number for the sequence to play. If a camera or its SD card is attached this ensures chronological order, what makes sense to me, but (re)arranging exported images from a Mac is a hassle, if trying to insert some images in between some already saved files. First I couldn't believe, that neither file name nor file modification, access, creation date nor some EXIF info is selectable for sorting the images on the Philips TV.
Ways I could go:
My first thought was about writing a Bash Script that does (re)formatting the USB flash drive to demanded FAT-32 filesystem (to wipe the file catalog) and then does copying one file after another to get the order I desire, but editing the inode number and/or file catalog seems to be a much faster and smarter solution.
Questions:
- Is the inode number the commonly used only criteria on (modern) TVs for sorting image files to display or is that a special Philips thing?
- I read about debugfs for e.g. ext4 filesystems, but I wonder if there is an equivalent for FAT-32 filesystem?
- I've been using SetFile for file modifications so far, but it doesn't look to be capable manipulating the inode number. Is there a (built-in) tool on macOS to edit inode numbers?
- If there is no existing tool for macOS, which functions in C, Objective C or Swift should I take a look at?
Any suggestion that includes the use of separate jpg files and is pointing to the right direction to get control of the allocation of inode numbers is welcome!
How can I edit the inode number (ls -i /path/to/file) of certain files after file creation on a FAT-32 filesystem?
Why I'd like to do this:
During the holiday season I encountered a problem with jpg images on USB flash drives showing up in some weird order on a Philips TV. After all, it turned out, that the TV just recognises the file serial number for the sequence to play. If a camera or its SD card is attached this ensures chronological order, what makes sense to me, but (re)arranging exported images from a Mac is a hassle, if trying to insert some images in between some already saved files. First I couldn't believe, that neither file name nor file modification, access, creation date nor some EXIF info is selectable for sorting the images on the Philips TV.
Ways I could go:
My first thought was about writing a Bash Script that does (re)formatting the USB flash drive to demanded FAT-32 filesystem (to wipe the file catalog) and then does copying one file after another to get the order I desire, but editing the inode number and/or file catalog seems to be a much faster and smarter solution.
Questions:
- Is the inode number the commonly used only criteria on (modern) TVs for sorting image files to display or is that a special Philips thing?
- I read about debugfs for e.g. ext4 filesystems, but I wonder if there is an equivalent for FAT-32 filesystem?
- I've been using SetFile for file modifications so far, but it doesn't look to be capable manipulating the inode number. Is there a (built-in) tool on macOS to edit inode numbers?
- If there is no existing tool for macOS, which functions in C, Objective C or Swift should I take a look at?
Any suggestion that includes the use of separate jpg files and is pointing to the right direction to get control of the allocation of inode numbers is welcome!
Last edited: