ZTree.com  | ZEN  | About...  

 Index   Back

[ZEP] Generic Open (ext.BAT) feature   [ZEP]

By: Slobodan Vujnovic   Homepage   France  
Date: Dec 22,2020 at 17:11

I have a number of batch files in my ZTree
directory created to Open my preferred audio
player, 1by1 https://mpesch3.de/1by1.html

MP3.BAT,MID.BAT,KAR.BAT,FLAC.BAT,WAV.BAT,CDA.BAT,OGG.BAT,WMA.BAT,...

All of the above contain the exact same launcher line:

start "" C:\1\Audio\1by1\1by1.exe %1

I have this idea: create a new Open rule that,
before (or after?) looking for ext.BAT files, looks
for a batch file named, in this case:

!MP3!MID!KAR!FLAC!WAV!CDA!OGG!WMA!.BAT

The above generic batch file will still contain the
same launcher line but, if needed, could examine the
input format for special cases:

if "%~x1"==".mp3" goto mp3_special
if "%~x1"==".wav" goto wav_special
...

to determine if we are Opening a WAV, MP3, OGG, etc.,
and do something special, maybe launch a different
audio player?

The benefits of a generic Open feature:

1. Reduce clutter, in this case, from 8 to 1 file

2. Easy maintenance, code sharing, no duplication

3. Switching from player1 to player2 requires
modifying just one line of code. I'm considering
trying http://www.foobar2000.org, but if I
want to plug it into ZTree, today, I would need to
create 8 separate batch files...

4. I have a similar situation with graphics and
archive files, where the number of files could be
reduced by folding them into a single batch file.

Any interest in this?

820 views      
Thread locked
 

Messages in this Thread

 
96,637 Postings in 12,231 Threads, 350 registered users, 68 users online (0 registered, 68 guests)
Index | Admin contact |   Forum Time: Mar 28, 2024 - 7:28 pm UTC  |  Hits:62,377,450  (29,847 Today )
RSS Feed