Connecting Tech Pros Worldwide Forums | Help | Site Map

How can I change a file's date?

terrychangsharp@gmail.com
Guest
 
Posts: n/a
#1: Feb 28 '07
I think this must be easy but, alas, I can't find it!
Is there any function I can use to change a file's date/time?


Martin Mandl - m2m tech support
Guest
 
Posts: n/a
#2: Feb 28 '07

re: How can I change a file's date?


On Feb 28, 8:51 am, terrychangsh...@gmail.com wrote:
Quote:
I think this must be easy but, alas, I can't find it!
Is there any function I can use to change a file's date/time?
It is ;) Have a look at http://at.php.net/manual/en/function.touch.php

bool touch ( string $filename [, int $time [, int $atime]] )

However, it does not really work under Windows.

Have fun
Martin

------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at

Chuck Anderson
Guest
 
Posts: n/a
#3: Feb 28 '07

re: How can I change a file's date?


Martin Mandl - m2m tech support wrote:
Quote:
On Feb 28, 8:51 am, terrychangsh...@gmail.com wrote:
>
Quote:
>I think this must be easy but, alas, I can't find it!
>Is there any function I can use to change a file's date/time?
>>
>
It is ;) Have a look at http://at.php.net/manual/en/function.touch.php
>
bool touch ( string $filename [, int $time [, int $atime]] )
>
However, it does not really work under Windows.
>
That's an overstatement, In Windows you can not modify the date and time
of a *folder*. It works fine on files, though.

--
*****************************
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
*****************************
Martin Mandl - m2m tech support
Guest
 
Posts: n/a
#4: Mar 1 '07

re: How can I change a file's date?


On Feb 28, 7:36 pm, Chuck Anderson <websiteaddr...@seemy.sigwrote:
Quote:
Martin Mandl - m2m tech support wrote:
Quote:
bool touch ( string $filename [, int $time [, int $atime]] )
However, it does not really work under Windows.
>
That's an overstatement, In Windows you can not modify the date and time
of a *folder*. It works fine on files, though.
Didn't know that, happy to learn something new ;)

Cheers
Martin


------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at

Closed Thread