0

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
slhck
  • 235,242
rashid
  • 206

2 Answers2

1

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.

OldTroll
  • 344
1

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

MaQleod
  • 13,258