.bat file

thart21

Registered User.
Local time
Today, 13:02
Joined
Jun 18, 2002
Messages
236
When I open my database on the shared drive using the .bat file, it opens fine (a little slow) and works with no problems, but I was wondering if anyone knew why these error messages were showing up in the cmd.exe window.


C:\WINNT\Profiles\thart\Desktop>md "c:\my documents" copy v:\Project\Materials\PurchSQE\Training\ MaterialsTraining.mdb
"c:\my documents\*.*"
A subdirectory or file c:\my documents already exists.
Error occurred while processing: c:\my documents.
A subdirectory or file copy already exists.
Error occurred while processing: copy.
A subdirectory or file v:\Project\Materials\PurchSQE\Training\MaterialsTraining.
mdb already exists.
Error occurred while processing: v:\Project\Materials\PurchSQE\Training\Material
sTraining.mdb.
The filename, directory name, or volume label syntax is incorrect.
Error occurred while processing: c:\my documents\*.*.

C:\WINNT\Profiles\thart\Desktop>"c:\Program Files\Microsoft Office\Office\MSACCE
SS.EXE" "v:\Project\Materials\PurchSQE\Training\MaterialsTraining.mdb"


Thanks for looking at it!

Toni
 
Toni,

Your first line is md (make directory).

I don't think that is what you really want to do ...

Maybe cd (change directory)

Wayne
 
It would really depend on whether every users computer is set up the same way whether you wanted to make or change directory. After a directory is made it doesn't matter that the batch file tries to make it again or not as it can't. That is the errors that you are getting. You should remove the *.* after c:\my documents.

C:\WINNT\Profiles\thart\Desktop>md "c:\my documents" copy v:\Project\Materials\PurchSQE\Training\ MaterialsTraining.mdb
"c:\my documents\*.*" Copies the db from the v drive to the c:\my documents directory

A subdirectory or file c:\my documents already exists.
Error occurred while processing: c:\my documents.
A subdirectory or file copy already exists.
Error occurred while processing: copy.
A subdirectory or file v:\Project\Materials\PurchSQE\Training\MaterialsTr
aining.
mdb already exists.
Error occurred while processing: v:\Project\Materials\PurchSQE\Training\Material
sTraining.mdb.
The filename, directory name, or volume label syntax is incorrect.
Error occurred while processing: c:\my documents\*.*.

C:\WINNT\Profiles\thart\Desktop>"c:\Program Files\Microsoft Office\Office\MSACCE
SS.EXE" " v:\Project\Materials\PurchSQE\Training\MaterialsTr
aining.mdb" Starts Access and opens the db
 
Thanks guys! I took out *.* and changed "md" to "cd" and here is what it looks like now-at least it's shorter :)


C:\WINNT\Profiles\thart\Desktop>cd "c:\my documents" copy v:\Project\Materials\
PurchSQE\Training\MaterialsTraining.mdb "c:\my documents\"

The filename, directory name, or volume label syntax is incorrect.

C:\WINNT\Profiles\thart\Desktop>"c:\Program Files\Microsoft Office\Office\MSACCE
SS.EXE" "v:\Project\Materials\PurchSQE\Training\MaterialsTraining.mdb"

Still works, but don't know what/if any problems could arise down the road.

Thanks again!

Toni
 
C:\WINNT\Profiles\thart\Desktop>cd "c:\my documents" copy v:\Project\Materials\
PurchSQE\Training\MaterialsTraining.mdb "c:\my documents\"

The filename, directory name, or volume label syntax is incorrect.

C:\WINNT\Profiles\thart\Desktop>"c:\Program Files\Microsoft Office\Office\MSACCE
SS.EXE" " v:\Project\Materials\PurchSQE\Training\MaterialsTr
aining.mdb"

I am assuming that you are getting this from the DOS window that appears as the info in red should not be in the target of the shortcut. Also try putting the *.* back in after c:\my documents to see if that eliminates the error. This is the whole, correct .bat.

cd "c:\my documents" copy v:\Project\Materials\
PurchSQE\Training\MaterialsTraining.mdb "c:\my documents\*.*"
"c:\Program Files\Microsoft Office\Office\MSACCESS.EXE" " v:\Project\Materials\PurchSQE\Training\MaterialsTraining.mdb"
 

Users who are viewing this thread

Back
Top Bottom