Results 1 to 6 of 6

Thread: executing dos commands

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Mexico
    Posts
    16

    Question executing dos commands

    How can I run commands like copy, or md ,cd... from VB


    Thanks...

  2. #2
    Frenzied Member markman's Avatar
    Join Date
    Nov 2000
    Location
    Florida.
    Posts
    1,197
    Shell "myBatchFile.bat"
    retired member. Thanks for everything

  3. #3
    Matthew Gates
    Guest
    Code:
    Shell "Command.com copy /parameters"
    'or
    Shell "copy /parameters"

  4. #4
    Hyperactive Member
    Join Date
    May 2001
    Location
    MN
    Posts
    362
    Would there be anyway to get the DOS output back to the VB app?

  5. #5
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    You can use > to output the prompt to a file.

    C:\copy c:\file d:\ >output.txt

    ...and Tada!

    Good luck,

  6. #6
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Oh yeah, you can then use the Open/Close to get the output.

    API sendmessage would probably work too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width