Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Naming Folders for backups (WinXp-Pro Sp-2)

    I don't know if I'm in the right place...

    I'm using (Acronis) True Image for nightly backups.

    I have a batch file that loads all the progs, and then TI has a scheduled backup it runs.

    That all works fine. BUT:

    TI puts the backups to the same folder (DAILY)), so to prevent writing over the previous backup, I want to have (vbscript?) the folder renamed to the date it was run, and then a new "DAILY" folder created. I would have this happen just prior to TI running the backup process each night.

    This way I would retain (a week's) backups from daily backups of my data files.

    How the heck?

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    I'm not familiar with this program's image files. Is there a way to instruct the program to incorporate date information into the file name?

  3. #3
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    Jefferson:

    No, you can manually name the backup "whatever", but the only automatic naming is "MyBackup".

    What I'm going to end up doing, probably, is each morning creating a folder named for that day's date, and moving the files.

    Better than nada, I suppose...

    Regards,
    Chuck Billow
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  4. #4
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    If you put the following batch file in your Startup folder (and adjust the folder references so they match where DAILY is in your directory structure), it may do what you want. BUT NOTE: You have to replace each of the three dollar signs ($) in the first line with the percent sign (%). (I couldn't use the % sign directly in my post because it caused the Lounge software to translate "%" followed by "da" to a foreign character. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>)

    The IF EXIST line causes the batch file to abort if you're rebooting for the 2nd (or 3rd, or 4th...) time in the same day.
    <pre>SET today=$date:~10,4%_$date:~4,2%_$date:~7,2%
    IF EXIST c:%today% GOTO End
    REN cAILY %today%
    MD cAILY
    :End</pre>


  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    > I couldn't use the % sign directly in my post because it caused the Lounge software to translate "%" followed by "da" to a foreign character

    % followed by a hexadecimal number is interpreted as a character code by HTML. for example, % followed by 41 becomes A since 41 hexadecimal = 65 decimal is the code for capital A.

    To avoid this, you can use <!t>[%]<!/t> to put a % in a post, for example <!t>[%]<!/t>da becomes %da.

  6. #6
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    By the clear light of dawn, a flaw in my previous post occurred to me. The name of each date-named folder will be one day off. That is, your Nov. 25 backup will end up in a folder dated 2006_11_26, and so on.

    John Gray or another batch-file guru may know how to fine-tune this further. One solution would be to run the batch file at the end of the day (after Acronis), rather than as part of the next day's startup.

    (On the other hand, it has just occurred to me that if your Acronis backups are running in the wee hours of the morning, my original batch file will give you the right date after all.)

    Final note: As you originally noted, I'm sure a simple VBScript could do the same thing, but I'm not a VBScripter.

  7. #7
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    Thanks for your post. I knew that -- before I forgot it. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  8. #8
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    Jefferson/Hans/st3333ve:

    This will all certainly be able to point me in the right direction. Thanks to all....

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  9. #9
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Marietta, Georgia, USA
    Posts
    296
    Thanks
    9
    Thanked 4 Times in 4 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    If you don't restart your computer daily, you should set this up as a daily scheduled task under Windows XP (instead of in the Startup folder). Probably before your daily scheduled task for Acronis True Image.
    Rick Groszkiewicz
    Life is too short to drink bad wine (or bad coffee!)

  10. #10
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    Rick:

    I don't want to have to leave *everything" running, just waiting, and that's what started this whole thread...

    I *could* just have Acronis (TrueImage) handle it's scheduling, but then the problem with the renaming popped it's ugly head, so I was/am dealing with a storage issue at the same time...

    Controlling the activity would be simpler, if not more flexible, by relying on the Task manager, but then....

    That's why, if I can set this thing up right, it will, every night at say, 12am, run the backup, and then shut down the computer. Then when I restart, the batch file will run that will rename the folder to the proper day...

    The end result (hopefully) will be an automated 7-day backup cycle, which *should* be enough....

    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  11. #11
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Marietta, Georgia, USA
    Posts
    296
    Thanks
    9
    Thanked 4 Times in 4 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    Chuck, I don't leave my computer running all the time either. I put it on standby mode when I'm not using it. I also have set up the Power options (under Control Panel) to put it in standby mode after 1 hour of inactivity.
    Rick Groszkiewicz
    Life is too short to drink bad wine (or bad coffee!)

  12. #12
    Uranium Lounger CWBillow's Avatar
    Join Date
    Jul 2002
    Location
    Las Vegas, NV USA
    Posts
    6,371
    Thanks
    78
    Thanked 12 Times in 11 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    Rick:

    I had various problems with Standby, and had to quit using it. I do use "Hibernate" though...

    This again entered into the equation when I was tinkering with this thing... because, since I don't keep my PC always running, I can't totally depend on the Task Manager either.

    So I figured I'd work around it....

    Regards,
    Chuck
    -------------------------------------------------
    "Good judgment comes from experience, and experience - well, that comes from poor judgment."

    ~ A(lan) A(lexander) Milne (1882-1956)- "House at Pooh Corner"

  13. #13
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    I think that there are several different problems here.
    1) scheduling a backup
    2) auxiliary tasks such as powering-off when a task is complete
    3) Identifying a collection of files by date.

    I ran into these types of problems when migrating from Win98 to WinXP about a year ago, especially since WinXP does not provide the features of AutoExec.bat to which I was accustomed.

    A great deal of my (boot) time work centres around a daly task. I have a folder C:Blotter with sub-folders for each date, thus C:Blotter20060110 today but C:Blotter2060109 yesterday etc. I test day-of-week to check for "Sat" and "Sun" for special weekend boot-time tasks. I use a desktop wallpaper based on the minute and second of re-boot time. The drive letter B: is automatically mapped to C:Blotter%Daily% where the environment variable Daily is set at boot time from the Date command. And so on.

    It all works well.

    There sees (to me to be nothing one cant do with a daily, or hourly switch. It just requires us to be devious in programming in a batch file what Microsoft would rather we didn't do. And who wants to Click when a computer should be performing a boring and repetitive task, right?

    If in your case you merely want to run a task today with yesterday's date (or the last booted date), why not just echo the Date (from the Date command, or from an environment variable) into a text file at each re-boot, and then use that value as the file/folder name at the next first-boot-of-the-day?

  14. #14
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    If I'm following your suggestion, the run-at-startup batch file would first have a command that created the new folder (reflecting yesterday's date, from the saved text file) and then have a command that echo'd the current date to the saved text file (for use tomorrow).

    I know how to echo today's date to a text file (date /t > saveddate.txt), but what would the "first step" batch command look like (i.e., how do I set up a REN or MD command so that the new directory name reflects the contents of saveddate.txt)?

  15. #15
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Naming Folders for backups (WinXp-Pro Sp-2)

    > what would the "first step" batch command look like

    If I've understood your question ......

    I have attached my "autoexec" batch file.
    You will see that it makes use of two batch files - SetDate.bat and SetTime.bat. These I can supply on request, with the PC-Mag utility Change.COM. There are newer ways of obtaining the date & time in environment variables, but these old ones work for me and I am, as you know, reluctant to change (grin!).

    With SetDate and SetTime I have environment variables such as YR, MT, DY, HR, MN, SE, WEKKDAY and DAILY available to me.

    You will see the call to XPWALPAP which randomizes my wallpaper source (by copying a file %MN%%SE%BMP to Daily.BMP)

    I now use C:BLOTTER%DAILY% as a sentinel for "first boot". (I used to have sentinels for first-boot (force backup and shut down) and second boot (perform once-a-day tasks such as throwing up the birthdays reminder list). Remember that I map drive B: to this (daily) folder, and the Explorer shortcut points to drive B:, so I tend to be playing with files in today's blootter folder, it gets backed up tomorrow, and I get a fresh sheet of blotting paper ......

    BigbeigeboxD*.* will be available if the BigBeigeBox is powered up (so my morning routine is power on the BBB which has its own first-boot-backup sequence), and if it isn't, the laptop goes into a 30-second delay loop. Forever.

    XPCleaner is a flavour-of-the-day batch file to delete truly transient files.
    XPBack is a flavour-of-the-day call to XCOPY Used to backup only C:Greaves and C:Pers on weekdays, everything on weekends. Now I just backup the lot. What do I care? it's a 10MB connection to a 40GB IDE drive ......

    98SETSIG.BAT randomizes the signature (text) file in my Thunderbird account, so my correspondents don't get too bored .....

    The envelope file receives snapshots of addresses from my contact lists (PCFleDB, Access etc) and is used in my envelope printing, so i just flush it at each reboot.

    (I relented and dropped four files into the attached PKZIP25 file)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •