Jump to content

Ziptrain

From DocDepot

Ziptrain is a utility to collect and compress diagnostic data from the APU into a .zip file. It collects the 100 most recent train acquisitions (pre- and post-processed) by default, as well as configuration settings.

The number of train acquisitions can be specified using a positive integer, if more or less than 100 is desired. 

Alternatively, all files can be specified using the --all parameter. 

Specific file extensions can be specified using the --all parameter in conjunction with *.

In-terminal help is available via the --help parameter as well.


Regardless of which parameters are specified, configuration files are always collected.

The generated .zip file can be found in D:\AEI and will be named after the date as set on the APU. 

The naming format is TRYYMMDD.zip, e.g. a file compressed on December 1st, 2024 would be TR241201.zip.


Any previously compressed train acquisitions made by ZipTrain will be deleted when running the ziptrain command.

Instructions

LX-800 Systems

Copy ziptrain.bat to D:\AEI

Open the Windows command-line to D:\AEI

Enter "ziptrain.bat" in the Windows command-line, including any parameters desired. The utility will run and report back how many files it zipped.

The generated .zip file can be found in D:\AEI

T10 Systems

Copy ziptrain.bat to D:\AEI\util

Open the Windows command-line to D:\AEI\util

Enter "ziptrain.bat" in the Windows command-line, including any parameters desired. The utility will run and report back how many files it zipped.

The generated .zip file can be found in D:\AEI

Syntax

ziptrain.bat Compresses 100 most recent trains' pre- and post-processed acquisitions.
ziptrain.bat <int> Compresses the specified number of most recent trains' pre- and post-processed acquisitions.
ziptrain.bat --all Compresses all train files
ziptrain.bat --all *<extension> Compresses all files of the specified file type extension. Only one extension can be specified at a time.
ziptrain.bat --help Displays help

Examples

ziptrain.bat

Compresses the 100 most recent trains' pre- and post-processed acquisitions, along with configuration settings.

ziptrain.bat 83

Compresses the 83 most recent trains' pre- and post-processed acquisitions, along with configuration settings.

ziptrain.bat --all

Compresses all train files in the trains' directory, along with configuration settings.

ziptrain.bat --all *.035

Compresses all .035 files in the trains' directory, along with configuration settings.

ziptrain.bat --help

Displays help.


"   _______    _______        _        "
"  |___  (_)  |__   __|      (_)       "
"     / / _ _ __ | |_ __ __ _ _ _ __   "
"    / / | | '_ \| | '__/ _` | | '_ \  "
"   / /__| | |_) | | | | (_| | | | | | "
"  /_____|_| .__/|_|_|  \__,_|_|_| |_| "
"          | |                         "
"          |_|                         "

Parameters:

   First: Can specify number trains to zip or --all for all files. Files are zipped in order of modification, newest to oldest.
   Second: If using the --all command, you can specify all of which file, such as *.060's, rather than entire trains.

Examples:
   
   ziptrain.bat (will zip 100 *POST.SZP's and their _PRE.SZP pair if they exist, 100 trains (all their files) if not)
   ziptrain.bat 83 (will zip 83 of *POST.SZP and their _PRE.SZP pair if they exist, 83 trains (all their files) if not)
   ziptrain --all (will zip all files)
   ziptrain --all *.060 (will zip all *.060's)

Notes:

  -If a file is not found, a message will be displayed informing that 0 of that file were zipped.
  -If you pass in 92 but there are only 3 of that file, it will zip 3 and display that it zipped 3.
  -Configuration information, such as parameters and software version, are always zipped no matter the command.
  -Since the loop is based on last modified date, if you are not getting a train you expect,
   make sure that you are zipping enough trains to get files from a while back, or use --all to zip all.

Changes in 1.1.0

By default, ZipTrain now only collects the pre and post-processed acquisition files instead of all train files.

ZipTrain now also only collects the 100 most recent trains unless otherwise specified.

Functionality of configuration file collection remains the same.