comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Spaces in Mac file names
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Spaces in Mac file names [message #83992 is a reply to message #83991] Sat, 13 April 2013 11:33 Go to previous message
jeffnettles4870 is currently offline  jeffnettles4870
Messages: 111
Registered: October 2006
Senior Member
On Saturday, April 13, 2013 1:30:22 PM UTC-4, kagol...@lbl.gov wrote:
> Regarding spaces in Mac file and directory names: I know this is an old topic, but is there a generally accepted method, or a library function in someone's IDL library, to take a file name as input and output ac copy with the spaces escaped properly with backslashes?
>
>
>
> In other words, take
>
> /this/directory/has spaces/youknow.txt
>
> and output
>
> /this/directory/has\ spaces/youknow.txt
>
>
>
> I need this for a spawn command to work on arbitrary files. Thanks!

I usually do this:

ENVI> path = '/this/directory/has spaces/youknow.txt'
ENVI> print, strjoin(strsplit(path, ' ', /extract), '\ ')
/this/directory/has\ spaces/youknow.txt
[Message index]
 
Read Message
Read Message
Previous Topic: Spaces in Mac file names
Next Topic: COST atmospheric correction IDL code

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 05:03:40 PDT 2025

Total time taken to generate the page: 2.24019 seconds