Subscribe to Windows IT Pro
November 13, 2006 12:00 AM

A Scripting Solution for Cataloging Your File System

NTCatalog. js catalogs an NTBackup Bks for easy recovery
Windows IT Pro
InstantDoc ID #93962
Rating: (1)
Downloads
93962.zip

The main function then checks the value of the pos variable. When the value isn't -1, the function verifies that the line references an existing file or folder, then uses the FileDB object's Include method to add that file or folder to its internal Recordset object. When NTBackup backs up folders, it always backs up subfolders as well, so the Include method's Recurse parameter has the value true.

When the line contains the name of a file or folder that's to be excluded from backup, the main function uses the substring method at callout D to extract a copy of the string that doesn't include the " /exclude" portion. The function then determines whether the extracted substring specifies an existing file or folder. When it does, the main function calls the FileDB object's Exclude method to remove matching files from FileDB's Recordset. Because NTBackup always excludes subfolders of folders that it doesn't back up, the Exclude method's Recurse parameter is also true.

After each line of the .bks file has been read and processed, the main function closes the TextStream object and calls the FileDB object's WriteCSV method to create the CSV file.

Using the Script
You can use NTCatalog.js as part of your scheduled backup routine to create a CSV file containing the names of files to be backed up. Later, if you need to search for a file in a backup set, you can import the CSV file into a database tool and quickly find what you're looking for, saving time and energy.

Related Content:

ARTICLE TOOLS

Comments
  • Robert
    6 years ago
    Nov 30, 2006

    I didn't find a link for the NTCatalog.js file and the listing says it is an excerpt.

    Rob

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.