473,387 Members | 1,925 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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\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
3 5938
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
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

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Lowell Kirsh | last post by:
I have a script which I use to find all duplicates of files within a given directory and all its subdirectories. It seems like it's longer than it needs to be but I can't figure out how to shorten...
4
by: Enterprise Andy | last post by:
Hi, I am trying to use the Process object to launch an application (and in some cases open a file), however whenever there are any spaces in process FileName or Arguments I get an error stating...
3
by: D.P. Roberts | last post by:
I have 3 vbscripts and a vb form with radio buttons corresponding to each script. The form's only purpose is to provide a nice GUI for the user to decide which of the 3 scripts to run. Now, because...
88
by: Peter Olcott | last post by:
Cab you write code directly in the Common Intermediate language? I need to optimize a critical real-time function.
1
by: Pete | last post by:
I know MSBUILD doesn't like spaces in file paths when used as values of elements but I cannot find anything which documents the recommended handling etc... Any and all suggestions are...
6
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of...
3
by: Luke - eat.lemons | last post by:
Hi, Could someone tell me the correct quotation to get around spaces in paths for: Server.MapPath("\\server\share\spaces in name.mdb") I know its bad practice to use spaces but...
17
by: DesCF | last post by:
The following doesn't work: Dim photoPath As String = "R:\My Documents\My Pictures\MiscLL\" It doesn't work if I use double quotes either. It does work if I use a different path without...
1
by: td0g03 | last post by:
Hello, I am new to C and I am new to English. I not sure what palindromes mean. I don't know exactly what my teacher wants me to do. If someone could explain it to me in a different way that would be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.