none
Run DOS comands in VB???????? RRS feed

  • Question

  • How can I use or run DOS commands in VB???
    Or if any one knows tht in .net than olz tell me.....
    Monday, September 3, 2007 11:15 AM

Answers

  • In order to run a dos command from within VB you need to use the shell command. An example to move a word file from the c to d drive is as follows:

    lRet = Shell("cmd /c move /y c:\Oldlocation.doc d:\newlocation.doc",vbHide)

    the /c tells the cmd window to execute the string following. The /y on the move surpresses messages
    Tuesday, September 4, 2007 11:21 PM

All replies

  • In order to run a dos command from within VB you need to use the shell command. An example to move a word file from the c to d drive is as follows:

    lRet = Shell("cmd /c move /y c:\Oldlocation.doc d:\newlocation.doc",vbHide)

    the /c tells the cmd window to execute the string following. The /y on the move surpresses messages
    Tuesday, September 4, 2007 11:21 PM
  • Thanks Preetam thts gr8 to me.

    Thanks a lot...

    Sunday, September 9, 2007 4:04 PM