>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