Rob van der Woude's Scripting Pages

Help text for CaptureDate.cs

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

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

Usage:   CAPTUREDATE  image  [ options ]

Where:   image        specifies the image file(s) (wildcards allowed)

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)
         /R           Recursive (include subdirectories); you probably want
                      to use wildcards for image with this option
         /S           Set the image file's timestamp to the capture date/time
         /T           return the timestamp without "-" and ":" delimiters,
                      e.g. 20200805T211253 instead of 2020-08-05 21:12:53.
         /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. 2020-08-05 21:12:53.
         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 with /S it
         equals the number of files renamed, or 0 otherwise.

Written by Rob van der Woude

page last uploaded: 2020-03-25, 23:10