Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


November 13, 2006

A Scripting Solution for Cataloging Your File System

NTCatalog. js catalogs an NTBackup Bks for easy recovery
RSS
Subscribe to Windows IT Pro | See More Backup and Recovery Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

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.

End of Article

   Previous  1  2  [3]  Next  


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

Rob

robcohen November 30, 2006 (Article Rating: )


You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Related Articles Using Bzip2 Compression with Cmd.exe and PowerShell

Scripting Whitepapers From Development to Production: Streamlining SharePoint Deployment with DocAve Deployment Manager

Related Events Backup – The Backbone of Your Business

Disk-to-Disk Grows Up

Effectively Shrinking Your Backup Window – with CA ARCserve Backup Data De-duplication and the Riverbed Steelhead Appliance

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement