compare last access date of a file in windows to current date
by mcmackey100602 » Wed, 05 May 2004 04:46:18 GMT
Hi all,
I am new to perl and am working on in a Windows 2000 enviroment. I
have the need to compare the last access time of a file to the system
date and if it is greater that 2 weeks prior to the system date write
that file to a text file that will be used to archive the file.
Any help would be appreciated.
Thanks
matt
Similar Threads:
1.Comparing file dates with current date
I am trying to compare a file's modified timestamp with the current date.
I can use 'stat' to get the timestamp of the file but am not sure how to compare it to the localtime(). More importantly I want to be able to quantify the difference in days, month, hours and minutes.
Any suggestions?
2.URGENT HELP NEEDED--compare current date file with previous day
Hi All,
I am new in perl. I have report files which generate in particular
location day by day. I need to write a script to compare the current
date file with the previous day for first line. If there is a
difference it will generate email automatically to the users. The log
files with other few files generate in a folder which is named by date
(format: MM-DD-YY).
Some key points:
Location of the log files file:
/home/usr/09-26-06/log1.rpt and I need to compare with the previous
day: /home/usr/09-25-06/log1.rpt.... some thing like that.
The log.rpt file looks like:
PASS (P) 10
FAIL (F) 1.............................
I need to compare the second line. If the no. of FAIL changes then it
will send email automatically to the users.
Any help is appreciated.
Thanks.
3.--compare current date file with previous day
4.How compare two dates or convert date to number
Perl neophyte here.
I have a record date in the format mm/dd/yyyy and I want to compare it to
another date in the same format. Is there a simple way to accomplish this
task? All I want to do is say 'if date1 <= date0' do or don't do
something. I've looked, but to no avail. Help please...
Thank you in advance,
Hugh
5.Last "real" modification date of file
Bart Van der Donck < XXXX@XXXXX.COM > wrote:
>I am on FreeBSD.
>
>Is there a way to find out when file.txt was last changed ?
>I'm facing a situation when a file could legally be (re-)written with
>the same content. Don't ask me how I got there :-)
That depends upon if the file system (not the OS!) supports such a
value.
And for legal matters also if there are any means to set that value
manually.
jue
6. perldoc -q 'date|time' FAQ -- and -- making same change to *lots* of files, *without* date changed
7. file access dates
8. DBI, MS Access, inserting/updating a Access Date/Time value