Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to backup shell folders on my XP machine. It is useful for me because when I reinstall XP I can just restore those backed up shell folders.

Can you guys get me started or point me in the right direction?

'*************************************
' Author:
'
' This script backs up shell folders.
'
' Source:
' Destination:
'
'-------------------------------------
'Rev #          Changes
'-------------------------------------
'1.0            started
'*************************************

'*********
'VARIABLES
'*********

dim filesys
dim source
dim destination

source="C:\Documents and Settings"
destination="C:\Temp"    'will change in future revisions

'*********
'OBJECTS
'*********
set filesys=CreateObject("Scripting.FileSystemObject")


if filesys.FolderExists(source) Then
    filesys.MoveFolder source, destination
    MsgBox("Folder Moved")
End if
share|improve this question
    
You can use any type of scripting you'd like. Where exactly do you want to back up the folders to? secondary HD, network share, ftp site? –  MaQleod May 27 '11 at 20:56
    
to a partition. I want something to get started with. I have started the script in my edited question –  rashid May 27 '11 at 21:11
add comment

2 Answers

up vote 1 down vote accepted

An example of a simple batch script to copy your My Documents folder to a folder on another drive/partition

@echo off

if not exist "S:\backup" mkdir "S:\backup"

xcopy "%userprofile%\My Documents" "S:\backup" /e /v /c /h /r /y

share|improve this answer
    
will it also backup shell files on a network drive if i just specify "F:\backup" etc. Thank you. –  rashid May 27 '11 at 21:49
add comment

You may have better luck using the SpecialFolders (Described Here) than hard coding your path to the source folder since the OS will manage locating the actual folders, which might not be at C:\Documents and Settings or any such location.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.