I don't have [basedir] or [strippath] here, but [list-splat] (list-abs),
[s2l] and [l2s] (zexy) do the trick.
see attached
gr,
Tim


2013/10/27 Antonio Roberts <[email protected]>

> I want to be able to strip the file name from a path of a file opened via
> [openpanel]. I've looked into using [stripfilename] but that'd only work if
> the directory or file name length were the same in every situation.
>
> Can anyone help?
>
> Thanks
>
> --
> ============================
> [email protected]
> http://www.hellocatfood.com
> ============================
>
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management ->
> http://lists.puredata.info/listinfo/pd-list
>
>
#N canvas 149 153 450 437 10;
#X obj 45 117 s2l;
#X msg 72 94 symbol /;
#X obj 45 49 openpanel;
#X obj 45 142 list-splat -1;
#X obj 45 28 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 142 216 prepend set;
#X obj 45 170 l2s;
#X obj 45 71 t s b;
#X obj 45 246 prepend set;
#X text 13 272 path;
#X text 87 300 filename;
#X obj 45 198 prepend /;
#X obj 45 222 l2s;
#X msg 72 170 symbol;
#X msg 45 272 /home/tim/some/path;
#X msg 142 302 somefile.txt;
#X connect 0 0 3 0;
#X connect 1 0 0 1;
#X connect 1 0 6 1;
#X connect 2 0 7 0;
#X connect 3 0 6 0;
#X connect 3 1 5 0;
#X connect 4 0 2 0;
#X connect 5 0 15 0;
#X connect 6 0 11 0;
#X connect 7 0 0 0;
#X connect 7 1 1 0;
#X connect 7 1 13 0;
#X connect 8 0 14 0;
#X connect 11 0 12 0;
#X connect 12 0 8 0;
#X connect 13 0 12 1;
_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to