Pre/Post command help

Discussion in 'Acronis True Image Product Line' started by philetus, Aug 14, 2009.

Thread Status:
Not open for further replies.
  1. philetus

    philetus Registered Member

    Joined:
    Jul 8, 2009
    Posts:
    12
    Location:
    California
    I have a MS-Dos batch file
    @echo off
    echo --- Prep for Acronis True Image, Ctrl-C to cancel ---
    if not exist F:\backup\main_c\1CD*.tib goto end
    if exist F:\backup\main_c\4CD*.TIB del F:\backup\main_c\4CD*.TIB
    if exist F:\backup\main_c\3CD*.tib ren F:\backup\main_c\3CD*.tib 4CD*.tib
    if exist F:\backup\main_c\2CD*.tib ren F:\backup\main_c\2CD*.tib 3CD*.tib
    if exist F:\backup\main_c\1CD*.tib ren F:\backup\main_c\1CD*.tib 2CD*.tib
    :end

    When I put the .bat in pre and click test, it makes 1CDRIVE.TIB in F and says the command worked.

    When I start the backup, it changes 1CDRIVE.TIB to MyBackup1.tib.

    What am I doing wrong?
     
  2. GroverH

    GroverH Registered Member

    Joined:
    May 10, 2006
    Posts:
    2,405
    Location:
    Massachusetts, USA
    If F is an external drive, it must be attached during the edit to include the pre/post commands.

    By putting this into the pre command, you are wanting the bat file to rename the files before the backup is performed.

    By putting this into the post command, the batch file will perform the rename after the backup is over.

    This is very similar to what Brian K wrote in this posting:

    http://www.wilderssecurity.com/showthread.php?t=244560
    Post #9, 12, 13

    I'm not sure the test functions works correctly. Perform your own test and see if the batch works before you place it inside the pre/post options.

    Are you using the * as a wildcard or a simple character? If as a simple character, suggest you use a dash or underscore.
     
    Last edited: Aug 14, 2009
Thread Status:
Not open for further replies.