Connecting Tech Pros Worldwide Help | Site Map

How can I change a file's date?

  #1  
Old February 28th, 2007, 08:05 AM
terrychangsharp@gmail.com
Guest
 
Posts: n/a
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?

  #2  
Old February 28th, 2007, 09:25 AM
Martin Mandl - m2m tech support
Guest
 
Posts: n/a

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

  #3  
Old February 28th, 2007, 06:45 PM
Chuck Anderson
Guest
 
Posts: n/a

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
*****************************
  #4  
Old March 1st, 2007, 09:35 AM
Martin Mandl - m2m tech support
Guest
 
Posts: n/a

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple problem: change file input field value? Ciaran answers 4 March 5th, 2007 04:15 PM
How to determine when back-end file has been updated rdemyan via AccessMonster.com answers 8 December 6th, 2006 04:45 PM
Installer - change file permissions Dave Lambert answers 2 November 22nd, 2005 01:31 AM
Set file date Master of Pain answers 2 July 19th, 2005 08:35 PM
Installer - change file permissions Dave Lambert answers 1 July 19th, 2005 04:17 AM