hi list,
is it possible to get only the filename from openpanel? (in vanilla) or to extract the filename from the whole path? (i know this was not possible in earlier versions, but maybe it works somehow now)
cheers
The newest vanilla versions have [list fromsymbol] and [list tosymbol]. If you write it the output of [list fromsymbol] into an array using [array set] you can find the last / character (ascii 47), [array get] the rest ([list length] will help you figure out how much to get), and turn it back into a symbol with [list tosymbol].
On Mon, Nov 30, 2015 at 4:08 PM, Simon Iten itensimon@gmail.com wrote:
hi list,
is it possible to get only the filename from openpanel? (in vanilla) or to extract the filename from the whole path? (i know this was not possible in earlier versions, but maybe it works somehow now)
cheers _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
On 11/30/2015 10:08 PM, Simon Iten wrote:
is it possible to get only the filename from openpanel? (in vanilla)
not vanilla: iemlib's [splitfilename] does exactly what you want not vanilla either: zexy's [symbol2list]/[list2symbol] let's you build that easily
vanilla only solution: see matt's suggestion using the new: [list (to|from)symbol] objects
fgmas IOhannes
I also made a [list-s2l] using a bunch of printf commands from [makefilename]. I haven't looked at it in ages – it was a few years ago (2009?), and is kind of slow, but I think it works. See attached (requires list-abs).
On Mon, Nov 30, 2015 at 5:05 PM, IOhannes m zmölnig zmoelnig@iem.at wrote:
On 11/30/2015 10:08 PM, Simon Iten wrote:
is it possible to get only the filename from openpanel? (in vanilla)
not vanilla: iemlib's [splitfilename] does exactly what you want not vanilla either: zexy's [symbol2list]/[list2symbol] let's you build that easily
vanilla only solution: see matt's suggestion using the new: [list (to|from)symbol] objects
fgmas IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
here is a vanilla implementation, not sure if it is the easiest way, but it works here…
thanks for the guidance matt!
simon
On 30 Nov 2015, at 23:35, Matt Barber brbrofsvl@gmail.com wrote:
I also made a [list-s2l] using a bunch of printf commands from [makefilename]. I haven't looked at it in ages – it was a few years ago (2009?), and is kind of slow, but I think it works. See attached (requires list-abs).
On Mon, Nov 30, 2015 at 5:05 PM, IOhannes m zmölnig <zmoelnig@iem.at mailto:zmoelnig@iem.at> wrote: On 11/30/2015 10:08 PM, Simon Iten wrote:
is it possible to get only the filename from openpanel? (in vanilla)
not vanilla: iemlib's [splitfilename] does exactly what you want not vanilla either: zexy's [symbol2list]/[list2symbol] let's you build that easily
vanilla only solution: see matt's suggestion using the new: [list (to|from)symbol] objects
fgmas IOhannes
Pd-list@lists.iem.at mailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list http://lists.puredata.info/listinfo/pd-list
<list-s2l.zip>_______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
Not a native PD solution, but this is exactly what the Unix "basename" command does.
On Monday, November 30, 2015, Simon Iten itensimon@gmail.com wrote:
hi list,
is it possible to get only the filename from openpanel? (in vanilla) or to extract the filename from the whole path? (i know this was not
possible in earlier versions, but maybe it works somehow now)
cheers _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
http://lists.puredata.info/listinfo/pd-list