Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

bat file problem

Status
Not open for further replies.

whagar

Programmer
Oct 2, 2000
13
0
0
CA

Hi all,
I'm having a problem with a bat file created and executed from within Access97/2000. The bat file is using dos utilities and the path is passed dynamically to the function that creates the bat file using DatabaseObject.Name. The utilities are stored in the same directory as the database on the network. The databaseObject.Name is used to retrieve the path and strip off the database name. On some computers the string for the pathname returns the absolute pathname with full directory names (i.e.X:\SomeDirectory\AnotherDirectory\etc). On others the string returns the DOS format of the path (i.e.X:\SomeDir~1
\AnotherD~1\etc), this is the format that I would like returned. DOS does not like the other with long path names or spaces.
Does anyone know if there is a local setting that is involved in setting the string that the databaseObject.Name returns to a DOS format? This may also be a DAO issue with older versions returning the DOS format and newer ones just returning the Windows long filenames format, I'm not sure. Any takers?

Any help would be greatly appreciated,
Whagar

 
Hi,
If you are executing the batch file from within Windows, the Windows Command Prompt will accept the long path and filenames if you enclose the entire item in string quotations.
ie:

echo off
cls
cd\"program files"
REM or...
"c:\my long fold name\my executable file.exe"

However, pure DOS does not accept the quotes, as you already know.

Rob Marriott
rob@career-connections.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top