Necromorph Posted November 4, 2010 Share Posted November 4, 2010 i can't get this to work, and im wondering if you can push a $var into the command for the directory: #archivesLocalDir = @MyDocumentsDir & "\Folder\Folder\" #archivesNetworkDir = @HomeShare & "\Folder\Folder\" If @HomeDrive <> "U:" or DriveStatus("U:") <> "Ready" Then Exit Else $val = RunWait(@ComSpec & " /c" & "xcopy " & '"' & $acrivesLocalDir & '" "' & $archivesNetworkDir & '" /c /d /e /y') MsgBox(0, "Return Code", $val) EndIf but this isn't doing anything, and it is returning either "1" or "4" as i mess with it, there meanins can be found here http://technet.microsoft.com/en-us/library/bb491035.aspx. im just wondering if it is because of the the variables. thanks for any help. Link to comment Share on other sites More sharing options...
UEZ Posted November 4, 2010 Share Posted November 4, 2010 (edited) It seems to be that you have forgotten the blank after /c!$acrivesLocalDir = @MyDocumentsDir & "\Folder\Folder" $archivesNetworkDir = @HomeShare & "\Folder\Folder" If @HomeDrive <> "U:" or DriveStatus("U:") <> "Ready" Then Exit Else $val = Run(@ComSpec & " /c " & "xcopy " & '"' & $acrivesLocalDir & '" "' & $archivesNetworkDir & '" /c /d /e /y') MsgBox(0, "Return Code", $val) EndIf Br, UEZ Edited November 4, 2010 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Necromorph Posted November 4, 2010 Author Share Posted November 4, 2010 The Help Doc says to put the " " before the "/c", and if i format it to this " /c " it returns "0" which means all files were copied without error, but, nothing actually coppied, im not sure what is going on. Link to comment Share on other sites More sharing options...
UEZ Posted November 4, 2010 Share Posted November 4, 2010 Try RUN instead of RunWait!Br,UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Necromorph Posted November 4, 2010 Author Share Posted November 4, 2010 Still no good, im frustrated, thanks for the help. Link to comment Share on other sites More sharing options...
UEZ Posted November 4, 2010 Share Posted November 4, 2010 Hmm, try to remove the last "\" from the source and destination folder! I've update the code from post #2! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Necromorph Posted November 4, 2010 Author Share Posted November 4, 2010 (edited) haha, i tried that too. this is so dumb, i have some batch scirpts that do xcopy, and they all have the "\" at the end of the $dir. this is so dumb, and as for the senero: $archiveLocalDir has two files in it Test1.txt and Test2.txt, and $archiveNetworkDir, has nothing, i am a domain admin as well as a local admin, and just trying to xcopy to my personal drive on a file server, i have permissions to do so, so i don't think it's an NTFS issue. ggggggggrrrrrrrrr. im out of ideas. haha. i spoke to soon, removing the "\" at the end fixed it, why not sure, but i had tried that, but not before i move the " /c" to " /c ". thanks for the help!! Edited November 4, 2010 by redLabel Link to comment Share on other sites More sharing options...
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