Command line: play newer file in a folder, shuffled

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
Zane
Blank Cone
Blank Cone
Posts: 41
Joined: 25 Feb 2006 17:57
VLC version: latest, always!
Operating System: Win7 x64
Location: Ferrara, Italy
Contact:

Command line: play newer file in a folder, shuffled

Postby Zane » 27 Sep 2010 14:41

Hi all,
I'm looking for command line parameters to play only those files of a folder that were created in the last 90 days. Is that possible directly or should I script it?

Thanks!
Gianluigi "Zane" Zanettini

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Command line: play newer file in a folder, shuffled

Postby Jean-Baptiste Kempf » 28 Sep 2010 10:40

You should script it.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Zane
Blank Cone
Blank Cone
Posts: 41
Joined: 25 Feb 2006 17:57
VLC version: latest, always!
Operating System: Win7 x64
Location: Ferrara, Italy
Contact:

Re: Command line: play newer file in a folder, shuffled

Postby Zane » 28 Sep 2010 13:01

Thanks j-b. Autohotkey did the trick.

Here it's the code, if someone will ever need to do the same:

Code: Select all

DataLimite=%A_Now% EnvAdd, DataLimite, -90, days Loop, D:\Music\*, 0, 1 { if (A_LoopFileTimeCreated>DataLimite and (A_LoopFileExt="mp3" or A_LoopFileExt="wma")) { ElencoInMemoria=%ElencoInMemoria%`r`n%A_LoopFileLongPath% } } if(ElencoInMemoria=="") { ElencoInMemoria=D:\Music\DefaultSong.mp3 } FileDelete, D:\Programs\VLC media player\latest.m3u FileAppend, %ElencoInMemoria%, D:\Programs\VLC media player\latest.m3u Run, "D:\Programs\VLC media player\vlc.exe" --volume=256 --random "D:\Programs\VLC media player\latest.m3u"
Gianluigi "Zane" Zanettini


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 97 guests