Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Setup a custom column with two parent dirs and filename? (Read 622 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Setup a custom column with two parent dirs and filename?

As far as I know I can setup/define my own custom columns.

How can I setup a column which contains the filename and exactly the two parent dir name?

Example the song with the absolute path

D:\aaaa\bbbb\cccc\dddd\mysong123.mp3

should contain in the custom column the text value

cccc\dddd\mysong123.mp3

How can I define the corresponding pattern?

Peter

Setup a custom column with two parent dirs and filename?

Reply #1
You should use the $directory_path function.
Either something like:

Code: [Select]
$directory(%path%,3)\$directory(%path%,2)\$directory(%path%)


or if the first part of the whole path is always the same you can work it out with other string functions, something like

Code: [Select]
$right($directory_path(%path%),$len('D:\aaaa\bbbb\'))
I'm late