Updates the time and date stamps of a file with current values.
Touch #n
n:iexp, channel
Touch[#]n works only on files already opened with Open by making their time and date stamps current. The time and date stamps of the open file are set to values obtained from the system clock.
Local f$ = App.Path + "\Test.temp"
Local a%, i%
OpenW # 1
Open f$ for Output As # 1
For i% = 1 To 20
Print # 1, Format(i%)
Next i%
Close # 1
Files f$
//
For i% = 1 To 9 '9 Second Pause
Print AT(1, 3); "A short pause -"; 10 - i%; " seconds to go"
Delay 1
Next i%
Print AT(1, 3); "Pause over" & Space(100) : Print
//
Open f$ for Update As # 1
Touch # 1
Close # 1
Files f$
Kill f$
Opens the Test.temp file and writes the numbers from 1 to 20 to it. The Files is then used to print, among others, the time and date stamps.
A 10 second pause follows next. The time and date stamp of the Test.temp file are then updated with Touch and printed again using Files.
SetAttr, SetFileDateTime, SetFileDateTimeAcces, SetFileDateTimeCreate
{Created by Sjouke Hamstra; Last updated: 25/10/2014 by James Gaite}