|
-
Aug 18th, 2005, 11:34 AM
#1
Thread Starter
Junior Member
Try to run Shell command to excute Xcopy in Visual Basic
I am trying to run xcopy from Visual Basic using shell and it is not working. Any help is appreciated!
Shell "xcopy C:\Documents and Settings\sName\*.* /E /F /G /H /K /O /Y c:\temp\"
Am I doing it right?
The sNAME is a variable name that was inputed by the user when I prompt them to put their user name beforehand. (sName = UserID.Text)
I took the variable sNAME out and put my name which is a valid folder on the system and ran the shell command from VB and it did not do anything. (it is supposed to copy everything from C:\Documents and Settings\jatalife folder to c:\temp.)
Do I need to use batch file to do the copy? If so how can send the USERNAME in the batch file to copy the correct directory for the user.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|