The migrate command in VBScript for use under Langmeier Backup. The command performs a backup, while the folder paths to be backed up can be changed as desired on the backup.
For example, Windows XP folders can be:
C:\Documents and Settings\Peter\Own files
be written to the backup in such a way that the backed up folders conform to the file structures common in Windows Vista, Windows 7, and Windows 8 +10:
C:\Users\Peter\Own files
This can use fixed built-in macros, for example, automatically put the files in the correct file structure for Windows 7. Or the path parts to be changed can be specified using user-specific expressions.
Parameters
source
|
The source of the data to be migrated.
|
Target
|
The destination path. This is where the data will be copied to and, if necessary, the directories will be structurally renamed.
|
[Expression1]
|
Replacement expression in the form "expression1->expression2" - where expression1 is replaced by expression2 in the save path.
|
[Expression2]
|
Replacement expression in the form "expression1->expression2" - where expression1 is replaced by expression2 in the save path.
|
[Expression3]
|
Replacement expression in the form "expression1->expression2" - where expression1 is replaced by expression2 in the save path.
|
[macro]
|
A predefined macro for a fixed scheme of folder paths. This allows you to convert folder structures from, say, Windows XP directly to Windows 7 folder structures. The "macro" specification defines the target system for which the migration is performed.
Possible values:
· |
Default: No macro (substitutions are made as specified in Expression1, Expression2, and Expression3) |
|
Examples
'-------------------------------------------------------------------------------- 'Copy all PST files to the USB flash drive named "USB flash drive". 'The folder path "\Local Settings\Application Data\Microsoft\Outlook" becomes 'thereby "\Documents\Outlook Files" on the USB flash drive. '--------------------------------------------------------------------------------
Migrate "%UserProfile%\Local Settings\Application Data\Microsoft\Outlook\*.pst", "[USB flash drive]", "\Local Settings\Application Data\Microsoft\
Outlook\->\Documents\Outlook Files"
'-------------------------------------------------------------------------------- 'Here the destination folder entered in the backup job '(Destination) is used as the backup destination, and thanks to the asterisk all subfolders of 'C:\Documents and Settings are searched and in their subfolders the 'PST files are backed up. '--------------------------------------------------------------------------------
Migrate "C:\Documents and Settings\*\Local Settings\Application Data\Microsoft\Outlook\*.pst", Destination, "C:\Documents and Settings\->C:\Users\", "\Local Settings\Application Data\Microsoft\Outlook\->\Documents\Outlook Files\"
'-------------------------------------------------------------------------------- 'With macro "Windows7" adjust the folder structures that have changed between Windows XP and 'Windows 7 - taking into account all users that exist in C:\Documents and 'Settings thanks to the specification of an asterisk (*). '--------------------------------------------------------------------------------
Migrate "C:\Documents and Settings\*\Desktop", Destination, Windows7 Migrate "C:\Documents and Settings\*\Favorites", Destination, Windows7 Migrate "C:\Documents and Settings\*\My Documents", Destination, Windows7 Migrate "C:\Documents and Settings\*\Application Data\Microsoft\Signatures", Destination, Windows7
|