Link to home
Start Free TrialLog in
Avatar of Darrell Kirby
Darrell KirbyFlag for United States of America

asked on

Archiving Data

I am using Arcserv to Archive data by using the Global Options. Is there a way to run a report by Modified file date? I have to give a report to management stating what files will be archived prior to the actual run. I looked at the Arcserv report and do't see anything that can be ran for file Modification date. Thanks!
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Darrell Kirby

ASKER

A deletion of records with a Modify date of 2006 and prior. I need to run a report and present to management showing these files prior to the deletion run.
Avatar of BillDL
Hi Jim

I know nothing about the backup program you are referring to, but there are a number of ways you could create a report independently using a simple "DOS" batch file or a VBScript.  We would have to assume that the "Last Modified" dates found by the Arcserv program will match those found by windows CMD.exe and a VBScript, and that is something that I could not test.

First of all, in Windows XP (maybe Win2000) and later the DIR command allows you to specify which of the Windows Dates are used to sort files.  DIR /?

Example batch file that lists all file types in the given path and all sub-directories, excludes all results containing file 4-digit years of 2006 to 2001 and sorts the results by "last written" date with the oldest first.

@echo off
echo Creating File List report ...
echo.
dir /a-d /od /tw /s /4 "C:\FolderName\*.*">"C:\_FileReport.txt"

That includes all the DIR headers and splits the results into groups per-folder, but you can use that basic command and filter the results to compile a neat CSV list with just the file path and name, and the "last written" date.  A batch file can be given if you would like to try this.

The other commonly used method is a CVScript that uses the FileSystemObject.  If you look at the suggestion given by Richard MuellerMVP, Moderator, on Tuesday, November 17, 2009 3:42 AM here:
http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/dff6f402-79cd-48a7-a478-0394f429b4a9/
then you will find the code for a VBS file that allows you to specify a date (in the form MM/DD/YYYY) as your "files older than" point and which produces a listing of all files in the specified folder and all sub-folders with the "Modified" date prior to that date.  Optionally, and remarked out in the given code, is the option to delete the file if it is older than the given date.

Is that something you could use?
Would you like any explanations of how that VBS file works?

Bill
The requirement in the above VBS file was to list files OLDER than the given date.  If you changed the < to > in the line:
        If (objFile.DateLastModified < dtmDate) Then
it would list files NEWER than the given date, and that may provide you with a cross-check with what would be archived.
Sorry, I was typing too fast and still thinking about CSV files.  Where I referred to "CVScript" it should have been "VBScript".
Hmmm.  Seems like a logical choice to accept a comment that just asks a question.