ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-win32-users
perl-win32-users
RE: Determing if a file has changed
by Neil other posts by this author
Jan 31 2003 4:41PM messages near this date
view in the new Beta List Site
Re: Spreadsheet-WriteExcel | Re: Determing if a file has changed
-----Original Message-----
From: Neil [mailto:neil@[...].com]
Sent: Thursday, January 30, 2003 11:43 PM
To: perl-win32-users@[...].com
Subject: Determing if a file has change ....


What is the best way of determing if a file has changed since it was last
read ?

I have thought about looking at last mod time - but if that was less than
one second ago ....

Thanks,
Neil

----- Original Message -----
From: Tillman, James
To: 'Neil' ; perl-win32-users@[...].com
Sent: Friday, January 31, 2003 5:36 AM
Subject: RE: Determing if a file has change ....


You might be able to use Win32::ChangeNotify, which works real time on files
or entire directories.  It does, however, require that your script be
continuously running.  If that's not the case, I'd use last mod time as you
suggested.

jpt


Thanks jpt ... I am familiar with ChangeNotify - but its not really what I
want....

Basically, I want to open a file, read the contents, and munge the data and
write it out to a second file.

BUT ... if the original data file changes - I'd like to reparse/remung
before writing.

Unfortunately, last mod time does not work IF the data was changed twice in
the last second.

Size doesn't work because a byte chould be changed with no change in
size..and twice in the last second.

I was hoping that there could be some kind of checksum solution.

Thanks,
Neil



_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Neil
Alan Dickey
$Bill Luebkert

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved