How can I change a file's date?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • terrychangsharp@gmail.com

    How can I change a file's date?

    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

    #2
    Re: How can I change a file's date?

    On Feb 28, 8:51 am, terrychangsh... @gmail.com wrote:
    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

    ------------------------------------------------
    m2m server software gmbh


    Comment

    • Chuck Anderson

      #3
      Re: How can I change a file's date?

      Martin Mandl - m2m tech support wrote:
      On Feb 28, 8:51 am, terrychangsh... @gmail.com wrote:
      >
      >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

      *************** **************

      Comment

      • Martin Mandl - m2m tech support

        #4
        Re: How can I change a file's date?

        On Feb 28, 7:36 pm, Chuck Anderson <websiteaddr... @seemy.sigwrote :
        Martin Mandl - m2m tech support wrote:
        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

        ------------------------------------------------
        m2m server software gmbh


        Comment

        Working...