Replace Backslash by Slash


#1

Hi Forum,

I'm fighting with scripting to create a Playlist with relative Pathnames and "Forward"-Slashes instead of Back"-Slashes.
So far I created a small mte-File to make that happen, but ... unfortunately it does not what I want :angry:
Could somebody have a look on my Code and tell me whats wrong

The "Replace" in Line 2 should change the \ to / in the Variable %_folderpath_rel%. Probably I am using the wrong function :astonished: Please advise

btw: I tried as well some relexp ... but that always ends up in a Syntax-Desaster - I got no glue on how to define a working relexp .. and how to use a relexp in conjunction with replace ... do I have to do that ?

Any recommendations are welcome ... Thankx
Alex


#2

Try this export script ...

$filename(%_directory%.m3u)
$loop(%_path%)
$replace(%_folderpath_rel%%_filename_ext%,'\','/')$loopend()

DD.20100911.1929.CEST


#3
QUOTE (DetlevD @ Sep 11 2010, 19:29) <{POST_SNAPBACK}>
Try this export script ...
$filename(%_directory%.m3u)
$loop(%_path%)
$replace(%_folderpath_rel%%_filename_ext%,'\','/')$loopend()

DD.20100911.1929.CEST

Wow, great response ... and It works ! :w00t: :w00t: Thankx so much!

Now, just one question for my understanding - are these kind of mp3tag-variables like %_folderpath_rel% static and this was the reason why my Code wont run? I am asking so silly, because I could not see a major difference between your GOOD Code and my BAD Code :rolleyes:

Kind Regards
Alex