Archived from groups: microsoft.public.windowsxp.general (
More info?)
Dooh, I didn't think of that! At the same time it is clear
why multi-tasking OSs are not suitable for this type of
operation. It consists of three steps:
1. Set the date/time to some artificial value.
2. Modify the file's date stamp.
3. Restore the date/time to its correct value.
Apart from it being rather clumsy, there is every chance
that some other running process picks up the wrong
date/time in between steps 1 and 3, having undersirable
or disastrous consequences. For example, the Task
Scheduler might cut in and start a tape backup, or
a scheduled restart might be triggered at the wrong
time. A proper "touch" tool avoids all of these traps.
"David Candy" <.> wrote in message
news:uBAoos$cFHA.1036@tk2msftngp13.phx.gbl...
date 26/2/1980
time 12:00
copy /b file.txt+,,
--
----------------------------------------------------------------------------
----------------------
http://webdiary.smh.com.au/archives/_comment/001075.html
=================================================
"Pegasus (MVP)" <I.can@fly.com> wrote in message
news:%23oCT$t9cFHA.584@TK2MSFTNGP15.phx.gbl...
> The OP asked for a tool to change the datestamp of a file,
> not to set it to "now". The DOS method offers only a tiny
> subset of what a proper touch tool offers, namely to set
> the date stamp to any date and any time.
>
>
> "David Candy" <.> wrote in message
> news:ONSN7s6cFHA.2736@TK2MSFTNGP12.phx.gbl...
> Dos has always been able to change a file date to NOW.
>
> From Dos 6.2 Help file (supplied with windows 9x CDs)
>
> Changing the time and date of a file
>
> If you want to assign the current time and date to a file without
modifying
> the file, use a command in the following format. The commas indicate the
> omission of the destination parameter.
>
> copy /b source+,,
>
> --
> --------------------------------------------------------------------------
--
> ----------------------
>
http://webdiary.smh.com.au/archives/_comment/001075.html
> =================================================
> "Pegasus (MVP)" <I.can@fly.com> wrote in message
> news:OIlVLBMcFHA.2980@TK2MSFTNGP10.phx.gbl...
>>
>> "Dead_Dad" <XXXspamtrap007@yahoo.comXXX> wrote in message
>> news:lIwre.1667614$Xk.870538@pd7tw3no...
>>> Philip K. wrote:
>>> > Is there a way to change the date of a file? If not, how can I keep
> the
>>> > original date after I modify a file and save it under a new name?
>>>
>>> This is one of the reasons I still depend on DOS Navigator
>>> (http://ndn.muxe.com/index.php) to do things easily that Windows just
>>> /can't/. You can change /all/ dates/times/attributes of one file as
>>> easily as a thousand, selecting it/them and pressing <ALT-E>. Anything
>>> you change is changed in all of them. (BTW, don't expect to figure out
>>> /everything/ it can do the first year. <G>)
>>
>> Mmh. DOS ***never*** had a tool to modify file dates, even
>> you appear to think so, and Windows does not have one either.
>> Both require a third-party tool such as Navigator.
>>
>>
>
>