Shelling to a Batch file with 2 command line arguments 
Author Message
 Shelling to a Batch file with 2 command line arguments

Hi,

In Vb6, I am shelling out to a Batch file which requires 2 command line
arguments. I
have the arguments in variables but the batch file takes the variable names
literally...how do I get the contents to pass in to the batch file
correctly?

line of code is:
Shell "CopyTree.bat CurrentRelNum WorkspaceFolder", vbNormalFocus

    where CurrentRelNum contains "2.0.2.6" and WorkspaceFolder contains
"d:\install"

Tks in advance,
W. Chamberlain



Sun, 03 Nov 2002 03:00:00 GMT  
 Shelling to a Batch file with 2 command line arguments
Change:
Quote:
> Shell "CopyTree.bat CurrentRelNum WorkspaceFolder", vbNormalFocus
To:
> Shell "CopyTree.bat " & CurrentRelNum & " " & WorkspaceFolder, vbNormalFocus

> Hi,

> In Vb6, I am shelling out to a Batch file which requires 2 command line
> arguments. I
> have the arguments in variables but the batch file takes the variable names
> literally...how do I get the contents to pass in to the batch file
> correctly?

> line of code is:
> Shell "CopyTree.bat CurrentRelNum WorkspaceFolder", vbNormalFocus

>     where CurrentRelNum contains "2.0.2.6" and WorkspaceFolder contains
> "d:\install"

> Tks in advance,
> W. Chamberlain




Sun, 03 Nov 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Weird problem with Shell, runas, and a batch file that has arguments

2. Bad Command or File name when Shelling DOS Batch File

3. shell dos w/ variable command line argument

4. Running a batch file using Shell command

5. Close DOS Batch File after Shell Command

6. How to print word document from command line / batch file

7. How to trap an arror when using Winzip command line in batch files

8. command line arguments for project files

9. Passing arguments to a vb .exe file from the command line

10. Command line arguments / file extension association?

11. Command-Line arguments using Command()

12. Shell Word with command line file name problem

 

 
Powered by phpBB® Forum Software