Space character in directory or file names

Discussion in 'NZ Computing' started by Matty F, Mar 28, 2010.

  1. Matty F

    Matty F Guest

    Using Win 98SE, when clicking on a file name in Explorer or after a
    Find or in a Document list, if the file name or any directory name
    contains a space character, some programs are unable to find the file.
    e.g. Notepad works fine but Wordpad doesn't.
    Using Firefox to open a JPG doesn't work, while Mozilla does work.

    So all files in My Documents are affected because of the space between
    My and Documents (do I really have to explain this!).
    I don't want to change it to MyDocuments - you won't believe how
    difficult that makes other things.

    Why have I not seen this happen in the last 10 years?
     
    Matty F, Mar 28, 2010
    #1
    1. Advertising

  2. Matty F

    Dave Doe Guest

    In article <4ca490b0-311e-4750-b72c-a38f746ea2f9
    @x23g2000prd.googlegroups.com>, says...
    >
    > Using Win 98SE, when clicking on a file name in Explorer or after a
    > Find or in a Document list, if the file name or any directory name
    > contains a space character, some programs are unable to find the file.
    > e.g. Notepad works fine but Wordpad doesn't.
    > Using Firefox to open a JPG doesn't work, while Mozilla does work.
    >
    > So all files in My Documents are affected because of the space between
    > My and Documents (do I really have to explain this!).
    > I don't want to change it to MyDocuments - you won't believe how
    > difficult that makes other things.
    >
    > Why have I not seen this happen in the last 10 years?


    Just a bit of a guess, but, file associations - check that the parameter
    is surrounded by quotes.

    For eg, if I check my file association for TXT files on this XPP
    machine...
    * My Computer, Tools, Folder Options, File Types... scroll to TXT
    files...
    * and click the Advanced button, then Edit button; it shows...
    "c:\Program Files\Notepad++\notepad++.exe" "%1"

    How are you opening the files? - as if you're opening them from an
    Explorer window, then only one program should ever open that type of
    file (one association).

    --
    Duncan.
     
    Dave Doe, Mar 28, 2010
    #2
    1. Advertising

  3. Matty F

    Matty F Guest

    On Mar 29, 10:37 am, Dave Doe <> wrote:
    > In article <4ca490b0-311e-4750-b72c-a38f746ea2f9
    > @x23g2000prd.googlegroups.com>, says...
    >
    >
    >
    > > Using Win 98SE, when clicking on a file name in Explorer or after a
    > > Find or in a Document list, if the file name or any directory name
    > > contains a space character, some programs are unable to find the file.
    > > e.g. Notepad works fine but Wordpad doesn't.
    > > Using Firefox to open a JPG doesn't work, while Mozilla does work.

    >
    > > So all files in My Documents are affected because of the space between
    > > My and Documents (do I really have to explain this!).
    > > I don't want to change it to MyDocuments - you won't believe how
    > > difficult that makes other things.

    >
    > > Why have I not seen this happen in the last 10 years?

    >
    > Just a bit of a guess, but, file associations - check that the parameter
    > is surrounded by quotes.
    >
    > For eg, if I check my file association for TXT files on this XPP
    > machine...
    > * My Computer, Tools, Folder Options, File Types... scroll to TXT
    > files...
    > * and click the Advanced button, then Edit button; it shows...
    > "c:\Program Files\Notepad++\notepad++.exe" "%1"


    For TXT files, this works fine without quotes:
    C:\WINDOWS\Notepad.exe

    What is the "%1"?

    > How are you opening the files? - as if you're opening them from an
    > Explorer window, then only one program should ever open that type of
    > file (one association).


    Yes the problem occurs when clicking on a file name in Explorer or
    after a Find or in a Document list, i.e. wherever Windows shows file
    names so that they can be clicked on to open them with the associated
    program. Obviously the parameter that contains the path name is being
    terminated as soon as there is a blank.
    It's a known Windows bug but I can't see a way around it without
    getting a different version of Windows, which I don't want to do for
    the next few months.
     
    Matty F, Mar 29, 2010
    #3
  4. Matty F

    Dave Doe Guest

    In article <7f5af7eb-42c5-4a7f-a669-
    >,
    says...
    >
    > On Mar 29, 10:37 am, Dave Doe <> wrote:
    > > In article <4ca490b0-311e-4750-b72c-a38f746ea2f9
    > > @x23g2000prd.googlegroups.com>, says...
    > >
    > >
    > >
    > > > Using Win 98SE, when clicking on a file name in Explorer or after a
    > > > Find or in a Document list, if the file name or any directory name
    > > > contains a space character, some programs are unable to find the file.
    > > > e.g. Notepad works fine but Wordpad doesn't.
    > > > Using Firefox to open a JPG doesn't work, while Mozilla does work.

    > >
    > > > So all files in My Documents are affected because of the space between
    > > > My and Documents (do I really have to explain this!).
    > > > I don't want to change it to MyDocuments - you won't believe how
    > > > difficult that makes other things.

    > >
    > > > Why have I not seen this happen in the last 10 years?

    > >
    > > Just a bit of a guess, but, file associations - check that the parameter
    > > is surrounded by quotes.
    > >
    > > For eg, if I check my file association for TXT files on this XPP
    > > machine...
    > > * My Computer, Tools, Folder Options, File Types... scroll to TXT
    > > files...
    > > * and click the Advanced button, then Edit button; it shows...
    > > "c:\Program Files\Notepad++\notepad++.exe" "%1"

    >
    > For TXT files, this works fine without quotes:
    > C:\WINDOWS\Notepad.exe
    >
    > What is the "%1"?
    >
    > > How are you opening the files? - as if you're opening them from an
    > > Explorer window, then only one program should ever open that type of
    > > file (one association).

    >
    > Yes the problem occurs when clicking on a file name in Explorer or
    > after a Find or in a Document list, i.e. wherever Windows shows file
    > names so that they can be clicked on to open them with the associated
    > program. Obviously the parameter that contains the path name is being
    > terminated as soon as there is a blank.
    > It's a known Windows bug but I can't see a way around it without
    > getting a different version of Windows, which I don't want to do for
    > the next few months.


    The %1 is the parameter (the filename you've double-clicked on in an
    Explorer window). If it's not surrounding by quotes, it might not work
    correctly - and only take the first 'word' of the filename (ie when you
    click on the two-word-named-files you're having trouble with).

    So for your notepad association, try changing it so it's:

    "C:\WINDOWS\Notepad.exe" "%1%

    and see if that helps.

    --
    Duncan.
     
    Dave Doe, Mar 29, 2010
    #4
  5. Matty F

    Jason Guest

    > What is the "%1"?
    >


    The parameter or in this case the filename, putting it in quotes ensures
    that the receiving programs gets it as just one parameter not two or more.
    Just a guess but notepad may work because it only takes one parameter.
     
    Jason, Mar 29, 2010
    #5
  6. Matty F

    Matty F Guest

    On Mar 29, 4:17 pm, Dave Doe <> wrote:
    > In article <7f5af7eb-42c5-4a7f-a669-
    > >,
    > says...
    >
    >
    >
    >
    >
    > > On Mar 29, 10:37 am, Dave Doe <> wrote:
    > > > In article <4ca490b0-311e-4750-b72c-a38f746ea2f9
    > > > @x23g2000prd.googlegroups.com>, says...

    >
    > > > > Using Win 98SE, when clicking on a file name in Explorer or after a
    > > > > Find or in a Document list, if the file name or any directory name
    > > > > contains a space character, some programs are unable to find the file.
    > > > > e.g. Notepad works fine but Wordpad doesn't.
    > > > > Using Firefox to open a JPG doesn't work, while Mozilla does work.

    >
    > > > > So all files in My Documents are affected because of the space between
    > > > > My and Documents (do I really have to explain this!).
    > > > > I don't want to change it to MyDocuments - you won't believe how
    > > > > difficult that makes other things.

    >
    > > > > Why have I not seen this happen in the last 10 years?

    >
    > > > Just a bit of a guess, but, file associations - check that the parameter
    > > > is surrounded by quotes.

    >
    > > > For eg, if I check my file association for TXT files on this XPP
    > > > machine...
    > > > * My Computer, Tools, Folder Options, File Types... scroll to TXT
    > > > files...
    > > > * and click the Advanced button, then Edit button; it shows...
    > > > "c:\Program Files\Notepad++\notepad++.exe" "%1"

    >
    > > For TXT files, this works fine without quotes:
    > > C:\WINDOWS\Notepad.exe

    >
    > > What is the "%1"?

    >
    > > > How are you opening the files? - as if you're opening them from an
    > > > Explorer window, then only one program should ever open that type of
    > > > file (one association).

    >
    > > Yes the problem occurs when clicking on a file name in Explorer or
    > > after a Find or in a Document list, i.e. wherever Windows shows file
    > > names so that they can be clicked on to open them with the associated
    > > program. Obviously the parameter that contains the path name is being
    > > terminated as soon as there is a blank.
    > > It's a known Windows bug but I can't see a way around it without
    > > getting a different version of Windows, which I don't want to do for
    > > the next few months.

    >
    > The %1 is the parameter (the filename you've double-clicked on in an
    > Explorer window). If it's not surrounding by quotes, it might not work
    > correctly - and only take the first 'word' of the filename (ie when you
    > click on the two-word-named-files you're having trouble with).
    >
    > So for your notepad association, try changing it so it's:
    >
    > "C:\WINDOWS\Notepad.exe" "%1%
    >
    > and see if that helps.


    I changed it to this and it works:
    "C:\Program Files\Accessories\Wordpad.exe" "%1"

    Google shows there are lots of people asking about this and not
    getting a sensible answer!
     
    Matty F, Mar 29, 2010
    #6
  7. In message
    <>, Matty F
    wrote:

    > I changed it to this and it works:
    > "C:\Program Files\Accessories\Wordpad.exe" "%1"
    >
    > Google shows there are lots of people asking about this and not
    > getting a sensible answer!


    Hmmm, I was trying to remember who it was recently who was pooh-poohing the
    usefulness of command lines...
     
    Lawrence D'Oliveiro, Mar 30, 2010
    #7
  8. Matty F

    Matty F Guest

    On Mar 29, 4:26 pm, "Jason" <> wrote:
    > > What is the "%1"?

    >
    > The parameter or in this case the filename, putting it in quotes ensures
    > that the receiving programs gets it as just one parameter not two or more.
    > Just a guess but notepad may work because it only takes one parameter.


    Yes that will be it. I had a look at all the documentation for Wordpad
    that I could find but MS only tells us about really really obvious
    things but not the things we really need to know.
     
    Matty F, Mar 31, 2010
    #8
  9. Matty F <> wrote:

    > On Mar 29, 4:26 pm, "Jason" <> wrote:
    >>> What is the "%1"?

    >>
    >> The parameter or in this case the filename, putting it in quotes ensures
    >> that the receiving programs gets it as just one parameter not two or more.
    >> Just a guess but notepad may work because it only takes one parameter.

    >
    > Yes that will be it. I had a look at all the documentation for Wordpad
    > that I could find but MS only tells us about really really obvious
    > things but not the things we really need to know.


    Nothing out-of-the-ordinary about that.

    --
    - Nicolaas
     
    Nicolaas Hawkins, Mar 31, 2010
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Idris Alooma
    Replies:
    10
    Views:
    734
    Dr. Carleton Bradley
    Oct 16, 2003
  2. news
    Replies:
    1
    Views:
    491
  3. JerryI

    Redundant Directory Names

    JerryI, Feb 24, 2008, in forum: Wireless Networking
    Replies:
    1
    Views:
    388
    Jack \(MVP-Networking\).
    Feb 24, 2008
  4. Robert11
    Replies:
    4
    Views:
    736
    chuckcar
    Jul 13, 2009
  5. David J Taylor
    Replies:
    2
    Views:
    648
Loading...

Share This Page