[PD] Filenames with spaces

Miller Puckette mpuckett at man104-1.ucsd.edu
Fri Nov 16 06:45:53 CET 2001


Here's a (cranky) idea I'm thinking about for this: what if "openpanel"
translated filenames into encoded strings without white space, so that
a filename, "program files", became "program\sfiles" and "a\b c" became
"a\\b\sc".  I'd fix all the file opening messages throughout Pd to make the
opposite translation -- whenever you see a backslash - s, substitute a
space...  

gotchas are:

1. anyone who really has a filename with a backslash, if it's in a qlist or
message box, has to change it;

2. everyone inthe world who "opens" files has to call a special 
de-backslashing function (which I'll incorporate into open_via_path()
for instance) before opening the file in question; same for "save" operations.

Does this sound like a reasonable solution?

cheers
Miller

On Thu, Nov 15, 2001 at 01:09:23PM +0100, pix wrote:
> it appears not, but even if it could, you would not really have any luck
> processing a value that contained spaces in pd. since it would be treated
> as a list most of the time.
> 
> it is particularly nasty that it doesn't work tho. especially with
> mp3play~, as it crashes pd if you give it an "open" command with a
> filename that doesn't exist (like one that is truncated at the first
> space, for example).
> 
> On Wed, 14 Nov 2001 21:42:15 +0100 (CET)
> Miha Tom <miha.tomsic at guest.arnes.si> wrote:
> 
> > 	Hello!
> > 
> > Is it possible for [openpanel] to return filename that includes spaces?
> > 
> > Thanks,
> > 
> > 	Miha...
> > 
> >  - Miha Tom¹iè --- C. na postajo 55 -- SI-1351 Brezovica pri Lj. ---
> SLOVENIA -
> > 



More information about the Pd-list mailing list