%_folderpath_rel% Relative path without file name


#1

Help says the %_folderpath_rel% placeholder is "Relative path without file name".

Relative to what? Here it is absolute i.e. contains a drive letter.

Thanks.


#2

Is %_folderpath_rel% supposed to work only for the export? It's always empty when used in an action or a converter. BTW, I also don't quite understand what that var. is good for. For example, I have loaded "C:\Dokumente und Einstellungen\Sebastian\Eigene Dateien\Eigene Musik\Hohe Qualität\Chris Rea" which contains a folder "Auberge" with a file called "01 Auberge.flac". In an export, %_folderpath_rel% gives out "Eigene Musik\Hohe Qualität\Chris Rea\Auberge".


#3

You may run the attached export script starting from different subfolders and you will get an idea what 'relative' means.
Export_Mp3tag_system_fields.mte (1.85 KB)
DD.20070626.0924

Export_Mp3tag_system_fields.mte (1.85 KB)


#4

Thanks. What do you mean by "starting from" a subfolder?


#5

You can invoke Mp3tag from any subfolder of your folder tree.
You may use the built in 'Change Folder' dialog to select the folder from where you want to look upon your files.
The current locked working folder is displayed in the Mp3tag title bar.

Look at the following examples. They show the same mp3 file but from different points of view.

Starting working folder is:
Example 1: 'O:\MUSIK'
Example 2: 'O:\MUSIK\A\Aerosmith'
Example 3: 'O:\MUSIK\A\Aerosmith\Greatest Hits'

The route or path you have to go from the working folder to the folder where the file resides is:
Example 1: 'A\Aerosmith\Greatest Hits'
Example 2: 'Greatest Hits'
Example 3: '' (empty) because you are already in the folder where the file resides.

You see that the length of the '_folderpath_rel' becomes shorter as you start from a location closer to your target file.
(In example 3 Mp3tag tells you a 'depth_path_rel' of '1' instead of '0'. Don't mind, this might be a recurrence of a bug that has been adressed some time ago.)

You see, all is relative, in relation to the starting working folder and in relation to the mp3 file, it depends on your point of view.

Example 1:
_parent_directory .......: Aerosmith
_workingdir .............: MUSIK
_workingpath ............: O:\MUSIK\
_path ...................: O:\MUSIK\A\Aerosmith\Greatest Hits\01_DreamOn_Aerosmith_GH_1980.mp3
_folderpath .............: O:\MUSIK\A\Aerosmith\Greatest Hits\
 depth_path .............: 4
_folderpath_rel .........: A\Aerosmith\Greatest Hits\
 depth_path_rel .........: 3
_directory ..............: Greatest Hits
_filename_ext ...........: 01_DreamOn_Aerosmith_GH_1980.mp3
_filename ...............: 01_DreamOn_Aerosmith_GH_1980
_filename_rel ...........: A\Aerosmith\Greatest Hits\01_DreamOn_Aerosmith_GH_1980.mp3

Example 2:
_parent_directory .......: Aerosmith
_workingdir .............: Aerosmith
_workingpath ............: O:\MUSIK\A\Aerosmith\
_path ...................: O:\MUSIK\A\Aerosmith\Greatest Hits\01_DreamOn_Aerosmith_GH_1980.mp3
_folderpath .............: O:\MUSIK\A\Aerosmith\Greatest Hits\
 depth_path .............: 4
_folderpath_rel .........: Greatest Hits\
 depth_path_rel .........: 1
_directory ..............: Greatest Hits
_filename_ext ...........: 01_DreamOn_Aerosmith_GH_1980.mp3
_filename ...............: 01_DreamOn_Aerosmith_GH_1980
_filename_rel ...........: Greatest Hits\01_DreamOn_Aerosmith_GH_1980.mp3

Example 3:
_parent_directory .......: Aerosmith
_workingdir .............: Greatest Hits
_workingpath ............: O:\MUSIK\A\Aerosmith\Greatest Hits\
_path ...................: O:\MUSIK\A\Aerosmith\Greatest Hits\01_DreamOn_Aerosmith_GH_1980.mp3
_folderpath .............: O:\MUSIK\A\Aerosmith\Greatest Hits\
 depth_path .............: 4
_folderpath_rel .........:
 depth_path_rel .........: 1
_directory ..............: Greatest Hits
_filename_ext ...........: 01_DreamOn_Aerosmith_GH_1980.mp3
_filename ...............: 01_DreamOn_Aerosmith_GH_1980
_filename_rel ...........: 01_DreamOn_Aerosmith_GH_1980.mp3

DD.20070626.1431


#6

That is the intended behavior, yes, but in my example, something went wrong obviously.

File: C:\Dokumente und Einstellungen\Sebastian\Eigene Dateien\Eigene Musik\Hohe Qualität\Chris Rea\Auberge\01 Auberge.flac
Working directory: C:\Dokumente und Einstellungen\Sebastian\Eigene Dateien\Eigene Musik\Hohe Qualität\Chris Rea
%_folderpath_rel%: Eigene Musik\Hohe Qualität\Chris Rea\Auberge
Correct relative folderpath: Auberge\

Bleh, my bad. %_folderpath_rel% is actually the relative folder path by starting where the exported file was saved to and not by looking at the Mp3tag working directory. Since I saved the file in Eigene Dateien, the relative folderpath was correct.


#7

%_folderpath_rel% is actually the relative folder path by starting where the exported file was saved to

Thanks, but not reproduced here (Mp3tag v2.38a) e.g.

. Track path: D:\temp\Ensuenos.mp3
. Export file path: D:\temp\temp.txt
. Observed %_folderpath_rel% value in exported file: D:\temp\Ensuenos.mp3
. Expected %_folderpath_rel% value in exported file: Ensuenos.mp3


#8

Can anyone help, please??

What I see (V2.37a) is e.g. with current folder (in title bar):

D:\Audio\Albums A\

exporting %folderpath_rel% for the track

D:\Audio\Albums A\Alfredo De Angelis\Nino Bien\01 La vida me engañó.wma

to file D:\temp\temp1.txt gives

..\Audio\Albums A\Alfredo De Angelis\Nino Bien\

I can make no sense of that!!

Could we have an official answer to what %folderpath_rel% is supposed to do? Thanks.


#9

I'm sure the last explanation that Sebastian gave is accurate.


#10

Then it seems we must be seeing variation between versions. I'll wait until I can swicth to the lastest and try some more. Thanks, dano.


#11

Your last example also confirms it

..\Audio\Albums A\Alfredo De Angelis\Nino Bien
is the relative path of
D:\Audio\Albums A\Alfredo De Angelis\Nino Bien\01 La vida me engañó.wma
to
D:\temp\temp1.txt

And the example you gave in the direct relpy to Sebastian is clearly flawed, %_folderpath_rel% never returns a filename