Getting filenames (selected by date) into a text file

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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.


.



Relevant Pages

  • Re: How to automate ASR restore process
    ... Setting up the RIS server to use ASR ... folder on the RIS server, ... make a backup copy of each .osc file before you ...
    (microsoft.public.windows.server.general)
  • Re: How to Empty Trash on Time Machine Volume
    ... Try using Disk Utility to do a Repair Disk on your Time Machine volume. ... SuperDuper can copy a Time Machine backup, ... 501 folder and emptying that folder. ... and the TM drives themselves would run out ...
    (comp.sys.mac.system)
  • Re: Backups HELP!
    ... One of your customer has encountered a backup issue on the SBS 2003 ... all child objects have inheritable permissions from the parent to propagate ... How to take ownership of a folder ... To take ownership of a folder, ...
    (microsoft.public.windows.server.sbs)
  • Re: Backups HELP!
    ... One of your customer has encountered a backup issue on the SBS 2003 ... all child objects have inheritable permissions from the parent to propagate ... How to take ownership of a folder ... To take ownership of a folder, ...
    (microsoft.public.windows.server.sbs)
  • Re: Incremental Manual Backup/Copy of Outlook Expess Messages Folder
    ... When I say dbx files, I mean "folder" dbx files. ... created) since the last incremental backup. ... bewtween incremental backups, would prevent me from using a "Modified Date" ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)