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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Multiple Command Lines 1

Status
Not open for further replies.

MikeC14081972

Programmer
May 31, 2006
137
GB
I'm trying to pass multiple command lines from Access using Shell

I can change the directory using the following

Code:
strShell = "cd /d H:\{Full FilePath}
This then leaces the command line window open with the following

{Full FilePath}>

My question is: How can I now pass another command to the open window to execute a batch file with parameters.

I have tried
Code:
strShell = "H:\{Full FilePath}\batch {parameters}"
but this doesn't work due to spaces in the filepath.

Thanks
 
If anyone is interested the answer is

Code:
strShell = "H:\{FullPath} && batch {parameters}"
Shell(strShell)

the
Code:
&&

acts as a command seperator.
 
Thanks for posting the answer when you found it. And that does sound interesting, hadn't thought of using command lines from within Access. That might help with a few things, if I ever get to those. [smile]

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top