By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,486 Members | 2,169 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,486 IT Pros & Developers. It's quick & easy.

Can't read paths with spaces

P: n/a
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\DAS'. 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\DAS 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?
Aug 3 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
evenlater <ev*******@gmail.comwrote in
news:ecf9f76f-b45c-4a20-b4c0-93c456cba4a7@
25g2000hsx.googlegroups.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\DAS'. 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\DAS
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.exe" "\\servername\DAS Files\Pipeline
database\Files\System\Security.mdw"
--
Bob Quintal

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

P: n/a
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\Application
Name.accde" /wrkgrp "\\servername\DAS Files\Pipeline Database\Files
\System\Security.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...@sPAmpatico.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.exe" "\\servername\DAS Files\Pipeline
database\Files\System\Security.mdw"

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**
Aug 4 '08 #3

P: n/a

the quotes don't make any since to me.

"C:\Program Files (x86)\Microsoft Office\Office12\MSACCESS.EXE"
"C:\Documents and Settings\Evan Cater\My
Documents\FEFiles\ApplicationName.accde"

/wrkgrp

"\\servername\DAS 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
<ev*******@gmail.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\Application
Name.accde" /wrkgrp "\\servername\DAS Files\Pipeline Database\Files
\System\Security.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...@sPAmpatico.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.exe" "\\servername\DAS Files\Pipeline
database\Files\System\Security.mdw"

--
Bob Quintal

PA is y I've altered my email address.
** Posted fromhttp://www.teranews.com**
Aug 5 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.