Hi,
I'd like to use [openpanel] to let a user easily chose a file without having to type its name, but then I would like to take the relative path of the file (relative to the patch) rather than its full absolute path. Is there a way to accomplish that?
Is there some external that would take an absolute path as a symbol, compare it to the current working directory, and return a relative path to the same file?
Alternatively, is there an external that can return the current working directory? On top of that, I could build an abstraction that would do almost what I need at least under some restrictions (e.g. when the file is in a descendant of the current folder)....
Thanks m.
On Mon, May 9, 2011 at 10:40, matteo sisti sette <matteosistisette@gmail.com
wrote:
Hi,
I'd like to use [openpanel] to let a user easily chose a file without having to type its name, but then I would like to take the relative path of the file (relative to the patch) rather than its full absolute path. Is there a way to accomplish that?
Is there some external that would take an absolute path as a symbol, compare it to the current working directory, and return a relative path to the same file?
Alternatively, is there an external that can return the current working directory? On top of that, I could build an abstraction that would do almost what I need at least under some restrictions (e.g. when the file is in a descendant of the current folder)....
Thanks m.
I use [absolutepath] and [relativepath] from moonlib.
Andras
Alternatively you could use [playlist], which is an in-patch file browser. by sending [location /folder/path/ ( to the object it'll jump to that location and you can also restrict what is displayed to a specific file extension.
Ant
2011/5/9 András Murányi muranyia@gmail.com:
On Mon, May 9, 2011 at 10:40, matteo sisti sette matteosistisette@gmail.com wrote:
Hi,
I'd like to use [openpanel] to let a user easily chose a file without having to type its name, but then I would like to take the relative path of the file (relative to the patch) rather than its full absolute path. Is there a way to accomplish that?
Is there some external that would take an absolute path as a symbol, compare it to the current working directory, and return a relative path to the same file?
Alternatively, is there an external that can return the current working directory? On top of that, I could build an abstraction that would do almost what I need at least under some restrictions (e.g. when the file is in a descendant of the current folder)....
Thanks m.
I use [absolutepath] and [relativepath] from moonlib.
Andras
Pd-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list