Getting filenames (selected by date) into a text file
- From: "Alex Lawnmower" <Alex.Lawnmower@xxxxxxxxxxxxx>
- Date: Wed, 15 Feb 2006 18:33:48 +0100
Hi,
I would like to do a daily backup of some files from a folder, but only the
20 most recent files.
I'm using straighforward NTBackup with the "bks" option which allows me to
specify a parameter file which I call mybackup.bks. This is a plain text
file that contains the paths and name of the files to backup.
My idea was to have a vbscript to create a new mybackup.bks on the fly just
before the backup started.
Mybackup.bks is basically in two parts :
**Part 1 is the stuff that never changes, i.e. the C: drive that is backed
up every night :
C:\
C:\pagefile.sys /Exclude
C:\Documents and Settings\Admin.....Windows NT\NTBackup\data\ /Exclude
then there's the data on D: where I have a software project.
**Part 2 changes every day, because we make hard drive copies of our data
and new software versions twice a day to a folder on D: named "Project
Copies". That folder contains two folders per day.
I want to back up
all of C:
then only the 20 latest (i.e most recent) files from the "Project Copies"
folder.
My idea was that the script should start by assigning all of the text of
Part1 into a variable, MyPart1.
Then read through the Project Copies folder and pick up all the filenames
(into a temp file ?) and get them sorted (descending by date) and then
assign the 20 latest (i.e most recent) paths and filenames to another
variable, MyPart2.
Then write the two variables MyPart1 and MyPart2 to Mybackup.bks.
Then run the bat file that runs the NTBackup.exe with the Mybackup.bks
fileset.
Anyone there willing to give me a hand with that ?
TIA
Alex.
.
- Prev by Date: Re: How to loop through randomizer without getting the same digits
- Next by Date: Expected end of statment 800A0400
- Previous by thread: Problems with registering Dll's
- Next by thread: Expected end of statment 800A0400
- Index(es):
Relevant Pages
|