Aigital MP4 Player - music titles out of order - creation date

https://www.amazon.com/Aigital-Supports-Economic-Multifunctional-Function/dp/B07YFWYG8L/ref=sr_1_2?keywords=mp4+player+flac&qid=1574750913&sr=8-2

I’v had this Aigital MP4 player for while (NTFS file system). When it was connected via USB on opensuse, I renamed all the files in a few folders to make the song title visible in the player.
‘01 artist name - song title’ → ‘01 song title’

Now the songs are out of order. In #1 is now at the end. Others have 3 or more files out of order.

I contacted tech support. The sorting order is based on creation date. So, I have to erase all the files in the folders(disordered). And copy each file one at time to get the order right again. That is 100’s of files.

To avoid copying all the files again and again, I’ve tried using the ‘touch’ command to alter the times and dates. This isn’t working.

for i in *.flac;do (touch -mt 11182245."${i:0:2}" "$i");done

filelist structure: [xx song title]

ls --full-time

The above code appears to work, but the player shows files (songs out of order). Copying the files one at a time does give an ordered list in the player.

Need help…

Hi
But that would be correct the “Copying the files one at a time does give an ordered list in the player.” as that is when they have been created… likely ntfs wisdom… Script the copying to put in the order you want…

So, there is no command to change the time and date stamp to change the creation date of a file (NTFS file system)? To make the player order the files.

I need to write a bash script to copy files in order after deleting all files in that folder. ?

Hi
Maybe look at creation time rather than modified time? Does it sort alphabetically or via number, call them 001, 002, 003 etc?

An error on my part. It has a removable 32gb drive formated as vfat (blkid -o list). Not NTFS.

Touch can be change access time and modify time.

Tech support was specific: mp4 player sorts by file creation date in vfat file system.

I deleted all folders. If I copy the folders one at a time, they will appear as normal on the player. If I rename any file after that, the song order will be changed.

01_song1
02_song2
03_song3
04_song4
05_song5

mv 01_song1 01_song1a

Renaming that, will put it at the end of the song list on the player.

Hi
Looks like it is what it is, make a change, script the file loading in your playlist order…

So, why does renaming the file change the creation date?

Hi
I would guess the limitation of the filesystem in use… see if fatsort helps (zypper in fatsort) https://fatsort.sourceforge.io/

Alright, this is the utility that will solve my problem. Thanks! :slight_smile:

Thanks to all who helped.

I found and installed fatsort. I get this message. The player uses a vfat file system.

#blkid -o list    
device          fs_type  label     mount point         UUID
--------------------------------------------------------------------------------------------
/dev/sdc1       vfat               (not mounted)       E05D-07C6

#fatsort /dev/sbc1
check_mounted: Unable to get realpath of filename!
openFileSystem: Could not check whether filesystem is mounted!
sortFileSystem: Failed to open file system!
main: Failed to sort file system!
#fatsort /dev/sbc
check_mounted: Unable to get realpath of filename!
openFileSystem: Could not check whether filesystem is mounted!
sortFileSystem: Failed to open file system!
main: Failed to sort file system!

Hi
The output is correct… it’s sdc1 not sBd :wink:

Yes, typos… off one error in programing. The one error that takes the most time.

Thanks all.

Hi
The good thing about the forum all those extra eyes :slight_smile: :slight_smile:

Off by One Bug - very hard to find, if you are not looking for it

Logic Flow Bug - these can get really hard to find - your head will seem like it is spinning in place.

Missing else statement - causes all kinds of problems - hackers love this one.

Getting back on topic. I need to do another post about music conversion.