Results 1 to 4 of 4

Thread: Last Accessed Date for a file

  1. #1
    Join Date
    Nov 2009

    Last Accessed Date for a file


    I have a issue for regarding the access of file for particular date. I want to read Last Accessed date of a file.I know that there are lots of method to do that but the problem is that when i am using any of the method it returns me today's date.Now i don't understand what to do so i finally decided to post my query here so that i can get the solution of the same. Help me with the proper solution. Waiting for the solution.

    Thanks in advance.

  2. #2
    Join Date
    Feb 2008

    Re: Last Accessed Date for a file

    Hey buddy,

    I having the same query about the reading the last access file date so i think i am the right person to resolve your query. Just the file expiration dates method. All the file expiration method with the date are stored in the file access. So check the code with the file expiration mechanism and see whether it is working or not. If it work then let me know the same.

    Thank you

  3. #3
    Join Date
    May 2008

    Re: Last Accessed Date for a file

    Use the Ctime() function to get the last accessed file date. It will be the better idea. This provides a way for getting on the scalar sense of the original core function localtime().

    for ( @ARGV )
    print "\tFile: $_"; 
    print "\t accessed : ", ctime( stat($_)->atime ); 
    print "\t modified : ", ctime( stat($_)->mtime ); 
    print "\t created on: ", ctime( stat($_)->ctime ); 

  4. #4
    Join Date
    Apr 2008

    Re: Last Accessed Date for a file

    Its better to use the GetFileTime API function which will give you the file times in Universal Time Coordinates which is the same as GMT. There is one more method known as FileTimeToLocalFileTime API function which will allow you to access the times in your local file system time

    Say thanks if it is working.

Similar Threads

  1. Help to allocate date for a text file
    By Owala in forum Windows Software
    Replies: 4
    Last Post: 26-07-2011, 08:06 PM
  2. Replies: 6
    Last Post: 26-10-2010, 02:01 AM
  3. Replies: 7
    Last Post: 17-10-2010, 02:44 AM
  4. File moved date time
    By antogod in forum Operating Systems
    Replies: 2
    Last Post: 04-02-2009, 04:51 PM
  5. Script insert date in the name of my file
    By Viensterrr in forum Software Development
    Replies: 4
    Last Post: 31-10-2008, 07:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts