I again come back with a tutorial on a file that has helped me while in the field of working (Everyone at work just got new PCs and needed their documents and files copied over, but everyone saves things in different places). I with some coworker created a batch file that will back up specific extensions that are on a pc to a mapped drive using the same directory structure that was already in place (ie. if you had a file called help.txt in your my documents folder it would back it up in a structure like so migrate>C>My Documents). I thought maybe someone out there could use this or add different better ideas to this thread.

Instead of uploading a .bat file and having everyone wonder if they can really download it or not, I am going to paste the code for the batch file in here and then post the instructions on how to use it so that you can create it worry free.

When you create this batch file name it migrate.bat

Batch file

@ECHO OFF

::start

if [%1]==[] goto error
set sname=%1

ECHO BACKING UP %sname% to H:\Migrate
H:
cd\

mkdir migrate

C:
cd\
dir


xcopy %sname%:\*.doc /S h:\migrate /H /I /C /K /E
xcopy %sname%:\*.dot /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.log /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.rtf /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.rpt /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.wps /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.xls /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.xlt /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.xlw /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.xla /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.ppt /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.wmf /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.pot /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.pps /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.ppa /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.png /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.mdb /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.mde /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.url /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.vsd /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.pdf /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.csv /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.prn /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.pab /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.pst /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.ost /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.jpg /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.gif /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.jpe /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.lnk /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.ram /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.rm /s h:\migrate /H /I /C /K /E
xcopy %sname%:\*.dbx /s h:\migrate /H /I /C /K /E

CLS
CLS
ECHO BACKUP COMPLETED.

ECHO CREATING REPORT ON BACKUP DRIVE
dir H:\MIGRATE /s >H:\MIGRATE\migrate.txt
PAUSE

goto end

:ndef
echo
echo ERROR: DRIVE NAME variable not defined and server name not supplied
echo in the command line.

:error

echo You MUST run this from command prompt and specify
echo the name of the drive being backed up!
pause

:end
goto QUIT

:QUIT
cls
cls
ECHO :::::::::::::::::::::::::::::::::::::::::::::::
ECHO :: PLEASE NOTE!!!!!!! ::
ECHO :: This script re-creates existing directory ::
ECHO :: structures even if a file from that ::
ECHO :: directory was not copied. ::
ECHO :::::::::::::::::::::::::::::::::::::::::::::::

ECHO PLEASE REMOVE FLOPPY IF USED


End Batch file

If you want to move different extensions just add the extension to the list or remove the ones you dont want.

Instructions

First you need to copy the above code and create the batch file.

Drop this file on the C:\ drive

Right click My Computer and select Map Network drive

Choose H:
type \\(location)\directory

ie. \\192.168.1.100\backup

Click Finish

Open a command prompt.

In command prompt type cd\

type migrate c

this will start the migration portion, migrating all the files from their old pc to the server in their user directory in a folder called Migrate

Thats it

I know there are better methods to do this but this one has worked the most reliably for us to just backup users data. Hope this helps anyone doing an upgrade or new pc rollout