Rob van der Woude's Scripting Pages

Help text for CaptureDate.cs

(view help text of CaptureDate.cs as plain text)

CaptureDate,  Version 1.02
Return the capture date and time for the specified image file

Usage:   CAPTUREDATE  image  [ options ]

Where:   image        specifies the image file

Options: /D:seconds   minimum Difference in seconds between current file
                      timestamp and capture date/time; if the difference
                      exceeds the specified number of seconds, the file
                      timestamp will be set to the capture date/time
                      (default: 3600 seconds = 1 hour; requires /S switch)
         /S           Set the image file's timestamp to the capture date/time
         /T           return the timestamp without "-" and ":" delimiters,
                      e.g. 20180318T112246 instead of 2018-03-18 11:22:46.
         /Y           do not ask for confirmation before changing the image
                      file's timestamp (requires /S switch)

Notes:   Result will be displayed on screen, e.g. 2018-03-18 11:22:46.
         The date/time is extracted by searching for the earliest date/time
         in the first 1048576 bytes (1 MB) of the image file.
         With /S switch used, the timestamp is changed only if the difference
         between the current timestamp and the capture time exceeds 1 hour or
         the threshold set with the /D switch.
         The program will ask for confirmation before changing the file's
         timestamp, unless the /Y switch is used.
         Return code ("errorlevel") is -1 in case of errors or if no valid
         date was found, or 0 otherwise.

Written by Rob van der Woude

page last uploaded: 2018-02-15, 10:51