Image file names with spaces

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Image file names with spaces

Sho Fujisawa
Dear list -

I'm writing a macro that opens images in a directory using "Bio-Formats Importer"

I've realized, however, that when I run the macro, it fails to open files with spaces in it (e.g. "M02 pre_M02 pre Area 04.tif").

But if I manually open the exact same image by going to "Plugins->LOCI->Bio-Formats Importer", the file opens fine.

It seems that when I ask to open list[i] in the macro, it thinks the space denotes the end of the filename.

Is this a bug? How can I get around this issue?

Thank you in advance.


Sho Fujisawa
Molecular Cytology Core Facility
Memorial Sloan-Kettering Cancer Center
415 East 68th St. ZRC-1840
New York, NY 10065
(646) 888-2186, x2186


 
     =====================================================================
     
     Please note that this e-mail and any files transmitted from
     Memorial Sloan-Kettering Cancer Center may be privileged, confidential,
     and protected from disclosure under applicable law. If the reader of
     this message is not the intended recipient, or an employee or agent
     responsible for delivering this message to the intended recipient,
     you are hereby notified that any reading, dissemination, distribution,
     copying, or other use of this communication or any of its attachments
     is strictly prohibited.  If you have received this communication in
     error, please notify the sender immediately by replying to this message
     and deleting this message, any attachments, and all copies and backups
     from your computer.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Image file names with spaces

ctrueden
Hi Sho,

> I've realized, however, that when I run the macro, it fails to open
> files with spaces in it (e.g. "M02 pre_M02 pre Area 04.tif").

Did you try enclosing your file name in square brackets ("[" and "]"
characters)?

Regards,
Curtis


On Tue, Jul 9, 2013 at 1:30 PM, Sho Fujisawa <[hidden email]> wrote:

> Dear list -
>
> I'm writing a macro that opens images in a directory using "Bio-Formats
> Importer"
>
> I've realized, however, that when I run the macro, it fails to open files
> with spaces in it (e.g. "M02 pre_M02 pre Area 04.tif").
>
> But if I manually open the exact same image by going to
> "Plugins->LOCI->Bio-Formats Importer", the file opens fine.
>
> It seems that when I ask to open list[i] in the macro, it thinks the space
> denotes the end of the filename.
>
> Is this a bug? How can I get around this issue?
>
> Thank you in advance.
>
>
> Sho Fujisawa
> Molecular Cytology Core Facility
> Memorial Sloan-Kettering Cancer Center
> 415 East 68th St. ZRC-1840
> New York, NY 10065
> (646) 888-2186, x2186
>
>
>
>      =====================================================================
>
>      Please note that this e-mail and any files transmitted from
>      Memorial Sloan-Kettering Cancer Center may be privileged,
> confidential,
>      and protected from disclosure under applicable law. If the reader of
>      this message is not the intended recipient, or an employee or agent
>      responsible for delivering this message to the intended recipient,
>      you are hereby notified that any reading, dissemination, distribution,
>      copying, or other use of this communication or any of its attachments
>      is strictly prohibited.  If you have received this communication in
>      error, please notify the sender immediately by replying to this
> message
>      and deleting this message, any attachments, and all copies and backups
>      from your computer.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Image file names with spaces

Sho Fujisawa
Ohhhh.... Thank you!!

Sho Fujisawa
Molecular Cytology Core Facility
Memorial Sloan-Kettering Cancer Center
415 East 68th St. ZRC-1840
New York, NY 10065
(646) 888-2186, x2186

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Curtis Rueden
Sent: Tuesday, July 09, 2013 3:45 PM
To: [hidden email]
Subject: Re: Image file names with spaces

Hi Sho,

> I've realized, however, that when I run the macro, it fails to open
> files with spaces in it (e.g. "M02 pre_M02 pre Area 04.tif").

Did you try enclosing your file name in square brackets ("[" and "]"
characters)?

Regards,
Curtis


On Tue, Jul 9, 2013 at 1:30 PM, Sho Fujisawa <[hidden email]> wrote:

> Dear list -
>
> I'm writing a macro that opens images in a directory using
> "Bio-Formats Importer"
>
> I've realized, however, that when I run the macro, it fails to open
> files with spaces in it (e.g. "M02 pre_M02 pre Area 04.tif").
>
> But if I manually open the exact same image by going to
> "Plugins->LOCI->Bio-Formats Importer", the file opens fine.
>
> It seems that when I ask to open list[i] in the macro, it thinks the
> space denotes the end of the filename.
>
> Is this a bug? How can I get around this issue?
>
> Thank you in advance.
>
>
> Sho Fujisawa
> Molecular Cytology Core Facility
> Memorial Sloan-Kettering Cancer Center
> 415 East 68th St. ZRC-1840
> New York, NY 10065
> (646) 888-2186, x2186
>
>
>
>      
> =====================================================================
>
>      Please note that this e-mail and any files transmitted from
>      Memorial Sloan-Kettering Cancer Center may be privileged,
> confidential,
>      and protected from disclosure under applicable law. If the reader of
>      this message is not the intended recipient, or an employee or agent
>      responsible for delivering this message to the intended recipient,
>      you are hereby notified that any reading, dissemination, distribution,
>      copying, or other use of this communication or any of its attachments
>      is strictly prohibited.  If you have received this communication in
>      error, please notify the sender immediately by replying to this
> message
>      and deleting this message, any attachments, and all copies and backups
>      from your computer.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html