Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Last Accessed Date for a file

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 01-12-2009
Member
 
Join Date: Nov 2009
Posts: 57
Last Accessed Date for a file
  

Hi,

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.

Reply With Quote
  #2  
Old 01-12-2009
Member
 
Join Date: Feb 2008
Posts: 1,845
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
Reply With Quote
  #3  
Old 01-12-2009
Member
 
Join Date: May 2008
Posts: 2,383
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().

Code:
 
for ( @ARGV )
{
print "\tFile: $_"; 
print "\t accessed : ", ctime( stat($_)->atime ); 
print "\t modified : ", ctime( stat($_)->mtime ); 
print "\t created on: ", ctime( stat($_)->ctime ); 
}
__________________
The FIFA Manager 2009 PC Game
Reply With Quote
  #4  
Old 01-12-2009
Member
 
Join Date: Apr 2008
Posts: 2,139
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Last Accessed Date for a file"
Thread Thread Starter Forum Replies Last Post
Help to allocate date for a text file Owala Windows Software 4 26-07-2011 09:06 PM
Outlook 2007 error "The file C: \ Documents and Settings .... \ Outlook \ Archive.pst 'can not be accessed. It is used by another process ...." Ander K Windows Software 6 26-10-2010 03:01 AM
cannot send or receive data in Outlook 2010 - file cannot be accessed Honey Singh Windows Software 7 17-10-2010 03:44 AM
File moved date time antogod Operating Systems 2 04-02-2009 05:51 PM
Script insert date in the name of my file Viensterrr Software Development 4 31-10-2008 08:18 PM


All times are GMT +5.5. The time now is 05:38 AM.