[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

How to call a bat file

I am designing a program to do a discopy from one drive to another of same size.  I feel the file manipulation within VB would be time comsuming.  I am thinking on the line of a bat file for discopy command from dos to achieve this task. I am  not sure how to call a bat file through VB.  Your help would be appreciated.  If you know of a book that would be helpful please give the title and I will reference it.  

Thank you for your time.
0
Wrathorne
Asked:
Wrathorne
  • 2
1 Solution
 
TorusCommented:
you can call shell to copy the file.


call shell("copy <source> <destination>", vbNormalFocus) to achieve same
purpose

you can use xcopy or diskcopy also by calling shell.



0
 
TorusCommented:
you can also use shell to run your bat file also

call shell("YourbatFile.bat", vbNormalFocus)
0
 
CatiCommented:
Better than Shell we have the all time usefull API shellexecute
0
 
WrathorneAuthor Commented:
Adjusted points to 400
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now