The Migrate command in VBScript is designed for use with Langmeier Backup. It allows you to execute a data backup while flexibly modifying the folder paths of the files being backed up. This means you can adapt your backup to new directory structures as needed.
For example, consider the following scenario:
C:\Documents and Settings\Peter\My Documents
With the Migrate command, you can back up this folder so that it matches the standard file structure used in Windows Vista, Windows 7, Windows 8, and Windows 10:
C:\Users\Peter\My Documents
Integrated macros make it easy to automatically convert files to the correct folder structure for Windows 7, for example. Alternatively, you can define custom migration scenarios by specifying user-defined replacement expressions to modify path segments as needed.
Parameters
Source
|
The source path of the data you wish to migrate.
|
Target
|
The target path where the data will be copied. If necessary, directories will be renamed to match the new structure.
|
[Expression1]
|
A replacement expression in the format Expression1->Expression2 . Here, Expression1 in the backup path is replaced by Expression2 .
|
[Expression2]
|
Another replacement expression in the format Expression1->Expression2 . This allows for multiple path modifications within a single command.
|
[Expression3]
|
An additional replacement expression, following the same format, for further customization of the migration process.
|
[Macro]
|
A predefined macro for a specific folder path scheme. This feature allows you to convert folder structures from, for example, Windows XP directly into the folder structures of Windows 7. The Macro parameter specifies the target system for the migration.
Possible values:
- |
Windows7 |
- |
Windows8 |
- |
WindowsVista |
- |
Standard: No macro (replacements are made according to the specifications in Expression1 , Expression2 , and Expression3 ). |
|
Examples
'--------------------------------------------------------------------------------
'Copy all PST files to the USB drive named "USB stick".
'The folder path "\Local Settings\Application Data\Microsoft\Outlook" is
'transformed to "\Documents\Outlook files" on the USB stick.
'--------------------------------------------------------------------------------
Migrate "%UserProfile%\Local Settings\Application Data\Microsoft\Outlook\*.pst", "[USB stick]", "\Local Settings\Application Data\Microsoft\Outlook\*->\Documents\Outlook files"
'--------------------------------------------------------------------------------
'In this example, the destination folder Destination specified in the backup task is used as the backup target.
'Thanks to the asterisk, all subfolders of
'C:\Documents and Settings are searched, and the
'PST files are backed up from their respective subfolders.
'--------------------------------------------------------------------------------
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\"
'--------------------------------------------------------------------------------
'Use the "Windows7" macro to adjust folder structures that have changed between Windows XP and
'Windows 7. All users under C:\Documents and Settings are included, thanks to the use 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
|