AIMP Forum

Разное => Архив / Archive => Вопросы (архив) / Questions (archive) => Topic started by: pstein on February 14, 2016, 16:47:08

Title: %REPLACE() with wildcards?
Post by: pstein on February 14, 2016, 16:47:08
I would like to use the %Replace() function with wildcards "*" .Something like (mind the * !):

%Replace(%FileDir;*musicarchive, BASE)

So that the following (simplified) replacements are done:

D:\aaa\bbb\ccc\musicarchive\jazz\2015\song1.mp3  ---> BASE\jazz\2015\song1.mp3 
E:\ddd\eee\fff\musicarchive\rock\2014\song2.mp3  ---> BASE\rock\2014\song2.mp3 

Unfortunately * wildcards seems not to work.

Can this be added in the next release?

Thank you
Peter
Title: Re: %REPLACE() with wildcards?
Post by: Artem on February 14, 2016, 19:30:14
Can this be added in the next release?

I think yes
Title: Re: %REPLACE() with wildcards?
Post by: Artem on February 15, 2016, 08:53:42
Try to use this template:

%Replace(%StrCopy(%FileDir,%StrPos(musicarchive,%FileDir),65535),musicarchive,BASE);
Title: Re: %REPLACE() with wildcards?
Post by: pstein on February 20, 2016, 13:08:32
Great!
It works

:-)