Hydrogenaudio Forums

Hosted Forums => foobar2000 => General - (fb2k) => Topic started by: wcs13 on 2018-11-07 04:21:50

Title: Tag field that depends on whether a file exists or not
Post by: wcs13 on 2018-11-07 04:21:50
Hi,

I'd like to create a custom tag field which contents would vary depending on whether a particular file exists or not on my hard drive.

Something like : IF [path to the particular file] EXISTS, THEN %tag% = A, ELSE %tag% = B

Is that possible ? Any hints ?
Title: Re: Tag field that depends on whether a file exists or not
Post by: wcs13 on 2018-11-08 15:11:51
No hints at all ? Yes, no, maybe ?
Title: Re: Tag field that depends on whether a file exists or not
Post by: kode54 on 2018-11-09 08:07:07
Sounds horrible, and beyond the scope of title formatting. Of course, it would have quickly been added to something like the old defunct global hook component, foo_cwb_hooks. Don't tell me you wouldn't have loved some of that hot mess.
Title: Re: Tag field that depends on whether a file exists or not
Post by: wcs13 on 2018-11-09 15:26:56
Hmm, I don't remember having ever used that thing. I've read stuff about it in the last 10 years on HA, but no more.

Yes, I guess my idea is beyond the scope of title formatting. Maybe I could achieve it differently, via a windows recursive batch script and/or foobar text tools. I'll have to think about it.
Title: Re: Tag field that depends on whether a file exists or not
Post by: Daeron on 2018-11-09 18:45:41
What information would the tag show?

As I recall JScript panel and Panel Stack Splitter each has the equivalent of $getfile() but there might be a more sane way of achieving whatever you are trying to do.
Title: Re: Tag field that depends on whether a file exists or not
Post by: wcs13 on 2018-11-13 00:46:26
Well, ideally the tag would show the path to the file if the file exists, and then I would use foo_run to access the file.
But it's probably too complicated and not worth the effort.
SimplePortal 1.0.0 RC1 © 2008-2019