Sorry Daniele... my bad. I got confused by the way your question is worded.
You can actually use locatefile_extended() to locate folders as well.
void locatefolder(t_symbol *foldername)
{
char name[MAX_FILENAME_CHARS];
short path;
t_fourcc type;
strncpy_zero(name, foldername->s_name, MAX_FILENAME_CHARS);
if (locatefile_extended(name, &path, &type, NULL, 0)) {
error("folder %s not found", name);
} else {
post("folder %s, path %d", name, path);
}
}
If you need to convert it to a fully qualified path:
char pathname[MAX_PATH_CHARS];
short err;
err = path_topathname(path, name, pathname);
Let me know if everything is clear now.
- Luigi