Can't read paths with spaces

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • evenlater

    Can't read paths with spaces

    I've implemented Bob Larson's frontend auto-updater which runs a batch
    file that deletes an existing copy of my .accde and then replaces it
    with a copy of the most recent .accde file.

    When I run the auto-updater from an .accde locally on my Windows Vista
    laptop, it works great. But when I run it on an XP terminal server I
    run into an error. The code is successfully deleting the old .accde
    and replacing it with a new one, but when it tries to restart I get a
    message that says "The command line you used to start Microsoft Office
    Access contains an option that Microsoft Office Access doesn't
    recognize. Exit and restart Microsoft Office Access using valid
    command-line options."

    This is followed by a message that says "Microsoft Office Access
    couldn't find file '\\servername\D AS'. This file is required for
    startup." That path is the beginning of the path to my MDW file, but
    the actual path used in the batch file is "\servername\DA S Files
    \Pipeline Database\Files\ System\Security .mdw".

    In other words, it's not recognizing the space as part of the path.
    Has anyone ever encountered this? Is there another way to use a path
    containing spaces in the batch file?
  • Bob Quintal

    #2
    Re: Can't read paths with spaces

    evenlater <evancater@gmai l.comwrote in
    news:ecf9f76f-b45c-4a20-b4c0-93c456cba4a7@
    25g2000hsx.goog legroups.com
    :
    I've implemented Bob Larson's frontend auto-updater which runs a
    batch file that deletes an existing copy of my .accde and then
    replaces it with a copy of the most recent .accde file.
    >
    When I run the auto-updater from an .accde locally on my Windows
    Vista laptop, it works great. But when I run it on an XP terminal
    server I run into an error. The code is successfully deleting the
    old .accde and replacing it with a new one, but when it tries to
    restart I get a message that says "The command line you used to
    start Microsoft Office Access contains an option that Microsoft
    Office Access doesn't recognize. Exit and restart Microsoft Office
    Access using valid command-line options."
    >
    This is followed by a message that says "Microsoft Office Access
    couldn't find file '\\servername\D AS'. This file is required for
    startup." That path is the beginning of the path to my MDW file,
    but the actual path used in the batch file is "\servername\DA S
    Files \Pipeline Database\Files\ System\Security .mdw".
    >
    In other words, it's not recognizing the space as part of the
    path. Has anyone ever encountered this? Is there another way to
    use a path containing spaces in the batch file?
    >
    In a batch file, if there is one or more spaces in any valid path,
    you must surround the path name with double quotes

    "c:\Spaces in Path\MSAccess.e xe" "\\servername\D AS Files\Pipeline
    database\Files\ System\Security .mdw"


    --
    Bob Quintal

    PA is y I've altered my email address.
    ** Posted from http://www.teranews.com **

    Comment

    • evenlater

      #3
      Re: Can't read paths with spaces

      I have done so, actually. It reads:
      "C:\Program Files (x86)\Microsoft Office\Office12 \MSACCESS.EXE" "C:
      \Documents and Settings\Evan Cater\My Documents\FE Files\Applicati on
      Name.accde" /wrkgrp "\\servername\D AS Files\Pipeline Database\Files
      \System\Securit y.mdw"

      And it doesn't seem to have a problem reading the path to the
      database, just the path to the MDW file.

      On Aug 3, 5:26 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
      In a batch file, if there is one or more spaces in any valid path,
      you must surround the path name with double quotes
      >
      "c:\Spaces in Path\MSAccess.e xe" "\\servername\D AS Files\Pipeline
      database\Files\ System\Security .mdw"
      >
      --
      Bob Quintal
      >
      PA is y I've altered my email address.
      ** Posted fromhttp://www.teranews.co m**

      Comment

      • sparks

        #4
        Re: Can't read paths with spaces


        the quotes don't make any since to me.

        "C:\Program Files (x86)\Microsoft Office\Office12 \MSACCESS.EXE"
        "C:\Documen ts and Settings\Evan Cater\My
        Documents\FEFil es\ApplicationN ame.accde"

        /wrkgrp

        "\\servername\D AS Files\Pipeline Database\Files\ System\Security .mdw"


        BUT quotes always screw me up in sql statements so I am probably
        wrong.




        On Sun, 3 Aug 2008 21:49:52 -0700 (PDT), evenlater
        <evancater@gmai l.comwrote:
        >I have done so, actually. It reads:
        >"C:\Program Files (x86)\Microsoft Office\Office12 \MSACCESS.EXE" "C:
        >\Documents and Settings\Evan Cater\My Documents\FE Files\Applicati on
        >Name.accde" /wrkgrp "\\servername\D AS Files\Pipeline Database\Files
        >\System\Securi ty.mdw"
        >
        >And it doesn't seem to have a problem reading the path to the
        >database, just the path to the MDW file.
        >
        >On Aug 3, 5:26 pm, Bob Quintal <rquin...@sPAmp atico.cawrote:
        >In a batch file, if there is one or more spaces in any valid path,
        >you must surround the path name with double quotes
        >>
        >"c:\Spaces in Path\MSAccess.e xe" "\\servername\D AS Files\Pipeline
        >database\Files \System\Securit y.mdw"
        >>
        >--
        >Bob Quintal
        >>
        >PA is y I've altered my email address.
        >** Posted fromhttp://www.teranews.co m**

        Comment

        Working...