Home AOMEI Products Support

Scheduled Clone

edited November 2015 in AOMEI Products Support

Backupper Pro command line can implement the 'clone' feature.
While this works as advertised I took it further and included it in a batch file which can be run under the Task Scheduler in Windows 7 to automate the cloning.
Since the destination drive may be plugged into a USB port and drive letters are known to change I decided that the disk label or name would be used to search for the destination drive instead of a drive letter - that's because even if the disk letter changes, the label doesn't.
My batch file has two references to the disk name/label  (I used the name 'nonsuch')   -  change these two references to match your destination drive name.

You should be familiar with the command line options before proceeding.
Anyone familiar with batch files should have no problems  - others should be careful lest you end up writing the clone to the wrong drive: this generally ends in tears and curses.

The 'AMBackup'  option " /a" refers to the destination being an ssd drive, this option would be omitted for a regular hard drive.

Ahem, if Admin would like to give me a registered copy of the program for my efforts, I wouldn't say no image

Copy and paste the following lines into Notepad, change the nonsuch references to reflect your drive label, omit the /a option if necessary  and save the file with the .bat extension, e.g. clone.bat


for /f "delims=" %%a in ('WMIC Path Win32_volume where "Label='nonsuch'" Get DriveLetter /format:list') do >nul 2>&1 set "SystemVolume_%%a"
   SET _test=%SystemVolume_DriveLetter%
   SET _result=%_test::=%   
AMBackup /c /t system /d %_result%  /a /o yes
REM the following line labels the destination disk back to it's original name - in this instance it's 'nonsuch'.
label %_result%: nonsuch
exit

Sign In or Register to comment.