Re: Shell to DOS



Resolved the piping issue by creating a batch file and calling that
directly.
Messy but it works.

Terry

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@xxxxxx> wrote in message
news:OP7%23jjdUGHA.4884@xxxxxxxxxxxxxxxxxxxxxxx
"ngr" <ngr@xxxxxxxxxxxxxxxxxxxx> schrieb:
I want to be able to shell to DOS to pipe the contents of something to a
file which can then be read in by VB.

Example

Shell to DOS and then run ROUTE PRINT > FRED.TXT

return to VB and then open fred.txt to do sometning with that.

My attempts have so far failed as no piped file has been generated
whereas it works directly from DOS.

You'll have to start "cmd" (or "%COMSPEC%") instead of your application
because the '>' feature is a feature of the command shell. You can pass
the command string to "cmd" in the command line.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


.



Relevant Pages

  • Re: Shell to Command
    ... > I have a VB6 program that shells to the dos prompt then opens an ftp ... > manually start a dos session and type in the command line ftp, ... Am I missing something in the shell function? ...
    (microsoft.public.vb.syntax)
  • Re: Shell function - accessing an Access secure db (.MDW file)
    ... > Hi - Does anyone know the correct syntax for the shell function. ... You can use the Shell command. ... To execute internal DOS command (Dir, Copy, ... Private Declare Function OpenProcess _ ...
    (microsoft.public.vb.general.discussion)
  • Re: useing paramters with shell
    ... regarding the Shell command. ... You can use the Shell command. ... To execute internal DOS command (Dir, ... Specifying the command processor is safe & generic and ...
    (microsoft.public.vb.general.discussion)
  • Re: How to Use Shell command for DOS Commands
    ... > I want to execute following dos command through VB6.0, using shell ...
    (microsoft.public.vb.general.discussion)
  • Re: Command Line execution
    ... > You can use the Shell command. ... To execute internal DOS command (Dir, ... Specifying the command processor is safe & generic and ...
    (microsoft.public.vb.general.discussion)