INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Folder name  (Read 1337 times)

Blaine78

  • Galactic Citizen
  • ****
  • Posts: 472
Folder name
« on: November 27, 2011, 02:24:10 am »

Is there a way to show only the folder name in a view? i.e. not have full path name, E:\video\simpsons\, just 'simpsons' folder name?
Logged
Windows 10 | Sony 55W805C TV | Metrum Acoustics Musette DAC | Luxman L-550AX | PMC Twenty.23

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: Folder name
« Reply #1 on: November 27, 2011, 02:32:07 am »

this will give you the "last folder"

ListItem([Filename (path)], Math(ListCount([Filename (path)], \) - 1), \)
Logged
MT5FR

Blaine78

  • Galactic Citizen
  • ****
  • Posts: 472
Re: Folder name
« Reply #2 on: November 27, 2011, 02:50:18 am »

you are brilliant, thank you :)
Logged
Windows 10 | Sony 55W805C TV | Metrum Acoustics Musette DAC | Luxman L-550AX | PMC Twenty.23

Lasse_Lus

  • Citizen of the Universe
  • *****
  • Posts: 999
Re: Folder name
« Reply #3 on: November 27, 2011, 02:58:05 am »

you are brilliant, thank you :)

nope, marko is
Logged
MT5FR

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Folder name
« Reply #4 on: November 27, 2011, 10:43:01 am »

An alternate method, which some find more natural: :-)

   regex([Filename (path)], /#([^\\]+)\\$#/, 1)

It would be nice if ListItem() supplied with a negative index would indicate items from the right, as in:

  ListItem([Filename (path)], -1, \)
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up