Paxman23 Posted June 12, 2012 Posted June 12, 2012 (edited) Hi everyone!I've been racking my brain trying to get a small piece of code working to move a group of files across the network periodically, but I can't seem to get anything I try to work. Basically I'm moving Acronis Backup files (.TIB). The code I have shows no errors, but nothing happens.Dim objshellSet objshell = CreateObject("WScript.Shell")objshell.Run "xcopy D:\Backup\*.TIB Z:\12"objshell.Run "xcopy /y D:\Backup\.meta Z:\12"Set objshell = NothingIs there a reason nothing is moving? Like I said, there's no errors so I'm not sure what I'm doing wrong. Any help would be appreciated, I'm still very new to all of this! Edited June 12, 2012 by Paxman23
allen2 Posted June 12, 2012 Posted June 12, 2012 (edited) I think the problem might come from the missing "cmd.exe /c " before "xcopy..." but i would replace xcopy with robocopy which will be more reliable for this task (and it also doesn't need cmd.exe to run). Edited June 12, 2012 by allen2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now