RE: Determing if a file has changed
by Wagner, David --- Senior Programmer Analyst --- WGO other posts by this author
Jan 31 2003 4:54PM messages near this date
view in the new Beta List Site
RE: Determing if a file has changed
|
Spreadsheet-WriteExcel
Neil wrote:
> -----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
>
You might try MD5 on file which is supposed to give you a checksum
and then after processing, should be able to run again and come up with the
same number.
The Perl gurus will let us know if I am off base, but I thought
that's what MD5 did.
Wags ;)
**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
|