Rob van der Woude's Scripting Pages

Help text for CaptureDate.cs

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

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

Usage:   CAPTUREDATE  image  [ /T ]  [ /S  [ /Y ] ]

Where:   image    specifies the image file
         /S       set the image file's timestamp to the capture date and time
         /T       return the timestamp without "-" and ":" delimiters,
                  e.g. 20171116T235332 instead of 2017-11-16 23:53:32.
         /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. 2017-11-16 23:53:32.
         The date/time is extracted by searching for the earliest date/time
         in the first 1024 bytes 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.
         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