TSGL: How to rename-renumber backups
HBCANON
hbcanon at homemail.com
Sat Mar 29 10:17:27 EDT 2008
One software manufacturer Datestamps his archive reports by appending YYYY.MM.DD on the
front of the file name which is the only way they will sort correctly in a folder.
HBCanon
Geneva, FL
-----Original Message-----
From: list-bounces at tsgserver.com [mailto:list-bounces at tsgserver.com] On Behalf Of Tilman
Brandl
Sent: Thursday, March 27, 2008 21:41
To: Tech Support Guy Mailing List
Subject: Re: TSGL: How to rename-renumber backups
ED,
thanks for that idea - might be helpful to ask the Acronis people. Sofar I haven't found
an option to append/prepend a date.
I've found a solution meanwhile that might work: In my (old) SyncBack folder I found a
free vbs script for adding a timestamp. I've adapted it a little, and it will run after
each backup, adding a timestamp in before the filename. Funny enough, I feel more
comfortable with vbs than with complicated dos-batch files. Seems I forgot too many
details of that stuff during past years. ;-(
Thanks
Tilman
----- Original Message -----
From: "edLynn" <edlynn at gmail.com>
To: "Tech Support Guy Mailing List" <list at tsgserver.com>
Sent: Friday, March 28, 2008 1:30 AM
Subject: Re: TSGL: How to rename-renumber backups
> Tilman -
>
> I use Acronis, but manually rename each incremental backup 1,2,...and the
> program adds a date stamp.
>
> I am writing to suggest that you pose your problem to Acronis support.
> "Right from the horse's mouth" may be the best way. It's worked for me in
> other areas.
>
> ED
> ----- Original Message -----
> From: "Bo Maurin" <bo.maurin at ericsson.com>
> To: "Tech Support Guy Mailing List" <list at tsgserver.com>
> Sent: Thursday, March 27, 2008 12:39 PM
> Subject: Re: TSGL: How to rename-renumber backups
>
>
>> Hi Tilman,
>> As an alternative solution I would suggest you write a simple batch file
>> to rename the files. So after each back up you just double click on the
>> batch file to do the job for you. Assumption then is that your back up
>> is
>> - always named system-full.tib
>> - it is always stored in the same directory
>>
>> Proposal here will not rename them to
>> system-full-1.tib
>> system-full-2.tib
>> etc
>>
>> but rather to system-full <current date>.tib
>>
>> This is what I saw on the web. I have not tested it though
>>
>> @ECHO off
>> SETLOCAL
>> IF [%1] NEQ [] goto s_start
>>
>> :: Author - Simon Sheppard, July 2003
>> :: Tested for Windows NT, 2K, XP
>>
>> ECHO STAMPME.cmd
>> ECHO REName a file with the DATE/Time
>> ECHO.
>> ECHO SYNTAX
>> ECHO STAMPME TestFile.txt
>> ECHO.
>> ECHO STAMPME "Test File.txt"
>> ECHO.
>> ECHO STAMPME "c:\docs\Test File.txt"
>> ECHO.
>> ECHO Will rename the file in the format "Test
>> File-02-12-27 at 16-55.txt"
>> ECHO.
>> ECHO In a batch file use CALL STAMPME ...
>>
>> :: To change the filename format just change around the last line
>> below
>>
>> GOTO :eof
>>
>> :s_start
>>
>> SET _file=%~n1%
>> SET _pathname=%~f1%
>> SET _ext=%~x1%
>>
>> ::Get the date
>> :: note ISO 8601 date format would require 4 digit YYYY Year)
>>
>> FOR /f "tokens=6-8 delims=/ " %%G IN ('NET TIME \\%computername%') DO
>> (
>> SET _mm=%%G
>> SET _dd=%%H
>> SET _yy=%%I
>> )
>>
>> :: Get the time
>> FOR /f "tokens=1,2 delims=: " %%G IN ('time/t') DO (
>> SET _hr=%%G
>> SET _min=%%H
>> )
>>
>> ECHO Today is Year: [%_yy%] Month: [%_mm%] Day: [%_dd%]
>> ECHO The time is: [%_hr%]:[%_min%]
>>
>> REN "%_pathname%" "%_file%-%_yy%-%_mm%-%_dd%@%_hr%-%_min%%_ext%"
>>
>>
>> -----Original Message-----
>> From: list-bounces at tsgserver.com [mailto:list-bounces at tsgserver.com] On
>> Behalf Of Tilman Brandl
>> Sent: den 27 mars 2008 15:49
>> To: Tech Support Guy Mailing List
>> Subject: TSGL: How to rename-renumber backups
>>
>> Hi,
>>
>> maybe this has been discussed in the past, I just didn't find anything:
>> I'm trying to find a way for renaming/renumbering backups.
>>
>> My Acronis is scheduled to create a system-partition backup /image each
>> week or so ... Unfortunately, when creating that task, I can only give a
>> single filename for this, like system-full.tib There's no way to add a
>> date string of any kind ...
>>
>> What I would like is saving more than just a single backup, which means
>> I would have to rename them. I've sofar done this manually, a process
>> that's easy to mess up or also to forget. As a standard there's for
>> instance my 1st backup named "system-full.tib"
>>
>> So after the backup has finished, I rename it into "system-full-1.tib"
>>
>> Thus after the next new backup I have new files
>> system-full.tib
>> system-full-1.tib
>>
>> This time I increment the numbers, renaming them into
>> system-full-1.tib
>> system-full-2.tib
>>
>> until after a few more backup runs (planned max.at 4 files) I have e.g.
>> system-full.tib
>> system-full-1.tib
>> system-full-2.tib
>> system-full-3.tib
>> system-full-4.tib
>>
>> My filemanager (totalcommander) can batch rename files - manually. Using
>> a stored pattern it's quite easy, but I mustn't forget to do it and need
>> to click a few buttons. I would prefer to run a program before or after
>> each backup run (a step which Acronis provides) that would simplify that
>> whole process for me.
>>
>> Would there be an easy way to automate this?
>> Sofar I've looked for software but didn't find anything better than what
>> my filemanager can do - manually. I guess I would have to do some
>> scripting, something I *could* do only with considerable effort (forgot
>> most of what I knew of e.g. VB...). In the past I've played with AutoIt
>> and PowerPro - both would allow me to create macros or scripts, but I
>> hesitate to take the plunge.
>>
>> Any ideas appreciated
>> Tilman
_______________________________________________
Tech Support Guy Mailing List
http://www.tsgserver.com/list/
More information about the List
mailing list