You are here:  
TKC Blog
16

Here is an example of how to execute xcopy from VB Script.


' XCopy files from a source folder to dest folder in vb script
Set WShell = CreateObject("WScript.Shell")
WShell.Run "XCOPY ""c:\temp\source"" ""c:\temp\dest"" /R /Y /D", 1, True

 

Comments

vega
Wednesday, 10 March 2010 5:25 PM
how to running it?
tkaragiris
# tkaragiris
Wednesday, 10 March 2010 8:55 PM
Create a text file, then copy the code into file and save it with a .vbs extension for example: xcopy.vbs. Then just double click on the file to run it.

Post Comment

Name (required)

Email (required)

Website

Enter the code shown above:

Search Blog
TKC Blog Latest Articles
Blog Archive
 
Home | About Us | Benefits | TKC Blog | Contact Us