Jump to content

Recommended Posts

Posted (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 objshell

Set objshell = CreateObject("WScript.Shell")

objshell.Run "xcopy D:\Backup\*.TIB Z:\12"

objshell.Run "xcopy /y D:\Backup\.meta Z:\12"

Set objshell = Nothing

Is 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 by Paxman23

Posted (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 by allen2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...