Dec 192017
 
Turbo C code that will update a file's date/time stamp. "Touch".
File TC-TOUCH.ZIP from The Programmer’s Corner in
Category C Source Code
Turbo C code that will update a file’s date/time stamp. “Touch”.
File Name File Size Zip Size Zip Type
EXPARG.C 4034 1600 deflated
EXPARG.H 318 197 deflated
GETOPT.C 4228 1773 deflated
GETOPT.H 280 162 deflated
TOUCH.1 1867 823 deflated
TOUCH.C 5849 2030 deflated
TOUCH.COM 9238 6043 deflated
TOUCH.DOC 1805 819 deflated
TOUCH.PRJ 78 40 deflated
TOUCH.TXT 1294 693 deflated

Download File TC-TOUCH.ZIP Here

Contents of the TOUCH.DOC file




TOUCH(1) An MS-DOS UtilityTOUCH(1)


NAME
touch - modify the date and time stamp for the named file(s)

SYNOPSIS
touch [-d date] [-t time] [-v] filespec...

DESCRIPTION
Touch allows you to modify the date and time of last write stamp
for the named file(s). You may specify the date and/or time
touch is to use, or you may let touch default to the system date
and/or time.

Touch supports the following options:

-vVerbose: list the touched files to stdout.

-d date Date: use the specified date instead of the
system date. The date string must be in the form



Month must be an integer in the range [1..12];
day must be an integer in the range
[1..max_date_for_month]; year must be an integer
in the range [1980..2100], though [80..99] may
be used as a shorthand form for 1980..1999. The
delimiter may be any non-numeric character.

-t time Time: use the specified time instead of the
system time. The time string must be in the form

[]

Hour must be an integer in the range [0..23];
min must be an integer in the range [0..59]; the
optional sec must be an integer in the range
[0..59] The delimiter may be any non-numeric
character.

The filespec parameter(s) may be any legitimate MS-DOS filespec
and may include any valid MS-DOS wildcard characters.

If an error occurs during the attempted modification (such as
trying to modify a sub-directory), a message saying so appears
in the output next to the appropriate filespec. Touch then
continues with the next filespec.

AUTHOR
Richard Hargrove
Texas Instruments, Inc.
P.O. Box 869305, m/s 8473
Plano, TX 75086
214/575-4128





[ 1 ]



 December 19, 2017  Add comments

Leave a Reply