Big migration project and one tool do not work and need to be replace ASAP.
I will give more details if someone can help. Basically I would like to copy some of the content of old PCs drive to a server and back to the PC. I would like to make it to a silent backup and restore. The folders are as follow:
c:\Documents and Settings\Username\Application Data\*.*
c:\Documents and Settings\Username\Cookies\*.*
c:\Documents and Settings\Username\Desktop\*.*
c:\Documents and Settings\Username\Favorites\*.*
c:\Documents and Settings\Username\Local Settings\*.*
c:\Documents and Settings\Username\My Documents\*.*
c:\data\*.*
__________________
If you get dead silence after breaking the speed of sound, would you be in the darkness after passing the speed of light?
probably the spaces in the paths.. try quotes around them
we use robocopy here a lot, but i've written a program to do most of the work for me .. let me take a look at my code i know i've run into the spaces in paths problem before.
also you dont need the first "*.*" that can go after a space after the destination path.
The problem with Xcopy is that if a file is corrupted, locked or uncopyable (?) the program stops and you have to find the file delete it or whatever is needed and restart the Xcopy. I have users with GB of data and it takes sometime 1-2 hours to copy it. If it fails you increase this time by 2-3. At the end of the day I am back to very little transfer done. :bang:
__________________
If you get dead silence after breaking the speed of sound, would you be in the darkness after passing the speed of light?
probably the spaces in the paths.. try quotes around them
we use robocopy here a lot, but i've written a program to do most of the work for me .. let me take a look at my code i know i've run into the spaces in paths problem before.
also you dont need the first "*.*" that can go after a space after the destination path.
you can also make a bat file to do it and provide a var for it
upload.bat username
this is upload.bat -------------------------------------
xcopy "c:\Documents and Settings\%1\Application Data\*.*" "\\snow2srv\Migration\%1\Application Data" /c /e /d /y ...
-----------------------------------------------------------
the %1 will be replaced by the item on the cmd line when you run the bat file
__________________
Quote:
"Always vote for principle, though you may vote alone, and you may cherish the sweetest reflection that your vote is never lost." -- John Quincy Adams
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. and To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. and To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. and To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Still no go for me. The %1 gives an error in Robocopy. The quotes " " reports errors too. The rest of the command line works. I am reading about Robocopy on teh Internet ATM. This is a new thing for me and I am kinda lost in all this jargon (for me).
__________________
If you get dead silence after breaking the speed of sound, would you be in the darkness after passing the speed of light?
Frenchy .... not sure this will help very much, but I wrote a script that will move my network share to my PC and vice versa. It utilizes Robocopy, but runs in VBScript, which I know is overkill (long story). The script should be fairly simple to modify to have it request the username and then migrate the files listed.
Here it is... sorry it's not exactly what you need, but it's what I've got :)
Code:
'==========================================================================
'
' VBscript Source File -- Created with SAPIEN Technologies Primalscript 4.0
'
' NAME: Robocopy.vbs
'
' AUTHOR: Brandon Steili , www.netsyd.com
' DATE : 12/7/2005
'
' COMMENT: This script gives you the option of copying your my documents folder to
' your network drive, or copying your network drive to your my documents folder.
' The script requires Robocopy, and utilizes the /MIR /SEC switches. The only locations
' you need to edit to suit your network are in the subfunction at the end of the
' script. Username is determined automatically. There are a billion products that
' could do this, but none of them did quite what we wanted... so here it is.
'
'
' ==== Modification dates and users ====
'
' 12/8/05 Initial writing of script
'
'==========================================================================
Dim sourcedir,destinationdir,WshShell,Selection,robocopy,username
Set WshShell = Wscript.CreateObject("Wscript.Shell")
robocopy = """C:\Program Files\Resource Kit\robocopy.exe"""
username = Wshshell.ExpandEnvironmentStrings("%USERNAME%")
'Notify the user of the intentions
MsgBox (("** IMPORTANT **") & VbCrLf & VbCrLf & ("The Windows Resource Kit MUST be installed in C:\Program Files\Resource Kit\"))
'Get the user input for how to process
Selection = InputBox (("** IMPORTANT **") & VbCrLf & VbCrLf & ("Please select the mirror you wish to process") & VbCrLf & VbCrLf & ( "Press 1-- to move files from local to network") &_
VbCrLf & VbCrLf & ("Press 2 -- to move files from network to local") & VbCrLf & VbCrLf & ( "Press 0 -- If you wish to quit") & VbCrLf & VbCrLf & (""), 65, "")
If Selection = 0 Then
Wscript.Quit
Else
' Call the sub to determine the source and destination directories
SetFolders
'Process the files
WshShell.Run robocopy & " " & """" & sourcedir & """" & " " & """" & destinationdir & """" & " /MIR /SEC", , True
If Err.Number <> 0 Then
MsgBox ("** ERROR Received: **" & Err.number)
Wscript.Quit
Else
Err.Clear
End If
End If
MsgBox ("All Done. No Errors recieved.")
Sub SetFolders
Select Case Selection
Case(1)
sourcedir = "C:\documents and settings\" & username & "\My documents"
destinationdir = "\SERVERNAME\Users\" & username
Case(2)
destinationdir = "C:\documents and settings\" & username & "\My documents"
sourcedir = "\SERVERNAME\Users\" & username
Case else
MsgBox ("Invalid Seleciton. Exiting")
Wscript.quit
End Select
End Sub
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Note in the above script despite using the code tags it still added some funky spaces (like the declaration of the robocopy variable for example. This is not showing when I try to edit the post...
__________________
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.