TapeTrack Documentation

Because there is more to tape management than you ever realized

User Tools

Site Tools


technote:add_remove_flags_by_last_read

This is an old revision of the document!


Add Remove Flags Based Off Last Read Time

Add or Remove Flags based off last read time of Volumes using TMSS10ModifyFlags and a config file.

The process involves TMSS10ModifyFlags loading an input file, using a definition file, to extract the Volume-ID's. The Volume-ID's are then filtered using the configuration file and adding any qualifying Volumes to a scan file.

The scan file is then processed, adding or removing the defined Flags against the scan list Volumes.

Sample Files

Input file - Volumes.csv

001,OFFS,2021/07/15 22:10:33
002,OFFS,2021/07/15 22:10:34
003,OFFS,2021/07/15 22:10:35
004,OFFS,2021/07/15 22:10:36
005,OFFS,2021/07/15 22:10:37
006,OFFS,2021/06/15 22:10:38
007,OFFS,2021/06/16 22:10:39
008,OFFS,2021/06/17 22:10:40
009,OFFS,2021/06/18 22:10:41
010,OFFS,2021/06/19 22:10:42

Definition file - default.ttidef

# Set input file (use full path if not in current directory)
setFile(volumes.csv);

# Set delimiter used in CSV file
setCSVDelimiter(",");

# Set Customer-ID
setLiteral(CUSTOMER, 0002);

#Set Media-ID
setLiteral(MEDIA, LTO);

# Extract Volume-ID into BARCODE field
extract(BARCODE, 1, 3, 0);

Configuration file - last_read.cfg

traversal =
{
   scanfile= { file="default.ttidef"; };
   customer =
   (
      {
         id="0002";
         media =
         (
            {
               id="LTO";
               volume =
               (
                   {
                      id="*";
	          lastreadtime = "P:*-30";
                      skip=false;
                   },
                   {
                      id="*";
                      skip=true;
                   }
               );
            }
         );
      }
   );
};
technote/add_remove_flags_by_last_read.1626743294.txt.gz · Last modified: 2025/01/21 22:07 (external edit)