QUOTE(curian @ Oct 29 2003, 11:33 AM)
I've tried $directory(%_path%) already, but it extracts only the n-th directory in the structure, but I need every dir from the given level.
'drive:\firstdir\' should be cut off, and everything above this should be displayed.
You can try one of these:
Without filename:CODE
$puts(PATH,$replace(%_path%,%_filename_ext%,))
$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\'))))
$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))
With filename (and extension):CODE
$puts(PATH,$right(%_path%,$sub($len(%_path%),$strchr(%_path%,'\'))))
$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))
Remove 0-5 levels without filename:CODE
$puts(Remove_X_levels,4)
$puts(PATH,$replace(%_path%,%_filename_ext%,))
$ifgreater($get(Remove_X_levels),0,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),1,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),2,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),3,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$ifgreater($get(Remove_X_levels),4,$puts(PATH,$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))),)
$right($get(PATH),$sub($len($get(PATH)),$strchr($get(PATH),'\')))
Select the number of levels/directories to remove in the first line.
If you want the filenames too, change the second line to:
CODE
$puts(PATH,%_path%)
Edit: Minor change in the first codeEdit 2: Added the 0-5 code. I've got to stop now...