Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to run command line Exe having parameters in VB
Message
 
To
03/09/1998 08:52:21
Penmetsa Sridhar
Visualsoft Technologies Limited
Hyderabad, India
General information
Forum:
Visual Basic
Category:
Other
Miscellaneous
Thread ID:
00132720
Message ID:
00133806
Views:
12
>I have to copy all the files in one directory to another directory including the sub folders using Vb for making a BackUp. As i don't have any function to do that i have to run the xcopy.exe from the command line. Shell function runs the exe but i cannot pass the parameters such as source and destination.
>
>Is there any function in VisualBasic to do that? or any other solution.
>
>Help me to do this functionality

If you look at the VB's help for the Shell function you will find this for the PathName parameter:
"Name of the program to execute and any required arguments or command-line switches; may include directory or folder and drive."

You just have to aggregate the function an your parameters togheter like in the following example:
Shell "XCOPY.EXE c:\source c:\source\backup"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform