Computing.Net > Forums > Programming > weekly backups

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

weekly backups

Reply to Message Icon

Name: franku2009
Date: September 17, 2008 at 06:47:52 Pacific
OS: XP
CPU/Ram: 512
Product: Dell
Comment:

I want created a batch file that backup on weekly occurs but only keeps back for four weeks

i.e if its week1 then overwrite files in week 1 folder and same as week2, week3, week4

please help


thanks in advance




Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: September 17, 2008 at 08:38:16 Pacific
Reply:

@echo off
setLocal EnableDelayedExpansion

if not exist %TEMP%\# echo 0 > %TEMP%\#
set /p week#=<%TEMP%\#
set /a week#=week#%%4
set /a week#+=1
echo !week#!
echo !week#! > %TEMP%\#


=====================================
If at first you don't succeed, you're about average.

M2


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: weekly backups

Batch File - controled backup www.computing.net/answers/programming/batch-file-controled-backup/14024.html

deleting old backups www.computing.net/answers/programming/deleting-old-backups/13582.html

Batch File To temporarily backup www.computing.net/answers/programming/batch-file-to-temporarily-backup-/9826.html