I have a collection of CreativeCommons music on a USB, that I used a digital TV to listen to, but its default media player is a bit limited. It offers only two list orders (data and alphabetic), which can only be set universally (not per view), and apply to both folders and files. It also fails to pull track number metadata from files, and if I want any chance of listening to an album in the correct track order, I have to choose date order. But this then makes it really hard to search through the album list, without constantly toggling back and forth between date and alphabetic order.

Is there a way to spoof the date metadata on the album folders, so they reflect the year the album was released? For example, for an album released in 2015, the folder would tell the media player it was created in 2015.

EDIT: I'm using GNU-Linux, and ideally looking for a command I can use in a terminal, or tips on how to write a simple Bash script, to do the whole collection in one go.

  • Seems duplicate of this. Also, if album is released in 2015 then you can pre-fix year in album name. <Year>_<AlbumName> – Sandeep Jun 7 '18 at 7:07
  • Thanks for the link, but I'm using GNU-Linux, not Windows, so not a duplicate. I'll add this detail to the question. Also, I prefer not to change the folder title format for my portable collection, just to work with the one device this creates issues with (I prefer to use artist-year-album to group artists together, and the TV has no internal storage where I could change them just for that). Creative suggestion though :) – strypey Jun 7 '18 at 15:24

touch takes a -d argument that supports specifying the date of interest.

touch -d "2015-04-20" somefolder
  • That's the kind of command I'm looking for, thanks. touch -d "2015" albumfolder would do nicely for one album. I'm imagining a Bash script would be the way to run this through my whole collection (many album folders, all in one music folder). Any advice on how to get the script to take the year from the folder name (artist-year-albumname), and do the touch -d with it, for each folder? – strypey Jun 7 '18 at 17:03
  • Thanks for this, it looks like a great resource. But the title of this page is "Advanced Bash-Scripting Guide" and it's all Geek to me. I'm a total beginner at bash scripting. Does anyone know of a more newbie friendly equivalent? – strypey Jun 7 '18 at 19:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.