Load all files in a particular folder named with a future date

You have a question or need an advice about how to do something? Ask it here!
polp6880
Posts: 36
Joined: 19 Apr 2020 19:04
Re: Load all files in a particular folder named with a future date

Post by polp6880 »

Hi Bernd,

Thanks for getting back.

This is the output: https://pastebin.com/bGsQK6HA

I tried seeing what the output is but can't see anything that's set up incorrectly. There must be something though.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Load all files in a particular folder named with a future date

Post by radio42 »

Please check your Filter value. It starts with a space/blank, so please remove the leading space.
It must be '${yyyy}${MM}${dd}.mp3' but in the output I can see you specified ' ${yyyy}${MM}${dd}.mp3'

I hope you see/recognize the difference which for string heater or equal comparison very important.
polp6880
Posts: 36
Joined: 19 Apr 2020 19:04
Re: Load all files in a particular folder named with a future date

Post by polp6880 »

Hi Bernd,

Thanks for catching that. Indeed, that was the issue. As soon as I removed the leading space, the script worked fine.

The only other thing that I noticed was that the file with today's date was not loading. The first file was the one named with tomorrow's date. I tweaked the filter a bit like so: [FilenameOnly] >= '*[DATE:{${start_yyyy}-${start_MM}-${start_dd}}:{days}:{-1}:{yyyyMMdd}].mp3' - this worked perfectly.

Again, thanks Bernd for the awesome support.
User avatar
radio42
Site Admin
Posts: 8295
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Load all files in a particular folder named with a future date

Post by radio42 »

Here in all my tests today’s file was of course included, hence the greater or equal (>=) comparison.
Ie. check the Sorting feature of your media lib - as written.
However, if your tweak works perfectly- that is great!

Post Reply