Re: Detecting File Changes

From: William Ryan eMVP (dotnetguru_at_comcast.nospam.net)
Date: 04/28/04


Date: Wed, 28 Apr 2004 10:33:30 -0400

You could use the crypto libraries do build a hash of the file. It's is
Highly highly unlikely two files would have different hash values if they
weren't different. Even a small change will yeild a different hash.
However, why not use a FileSystemWatcher component to detect this? The
problem with the first approach is that you have no event, you'd need to
poll and in doing so, waste a lot of effort b/c you'd have to compare all
the files that didn't change to find the ones that did, plus you'd need to
store the filename and hash somewhere which isn't a problem, but adds some
complexity.
The file systemwatcher seems like it would do the trick.
"virtualswp" <anonymous@discussions.microsoft.com> wrote in message
news:74D2B947-995A-4088-B509-85F651789DFB@microsoft.com...
> Our application needs to have an extensive word processor built into it.
We
> have played around with the RTF control, and a few 3rd party controls with
> little success. I would like to use Word or Wordpad instead. Our
> application needs to be able to take any changes the user makes and upload
> them to a database. If our application creates a RTF file on the
harddrive
> and then startes the process to edit the file with the application
> associated with the RTF file format, is there an easy way to detect if the
> file has changed in size, or in the last time it was changed? (Without
> using the Office SDK) I noticed FrontPage does the same thing when
editing
> a file with say notepad. After you save the file, it detects a change and
> uploads the file to the webserver. Does anyone know a way to mimic this?
>
> Thanks.



Relevant Pages

  • Re: typo questions
    ... Hash: SHA1 ... You can upload them in resources, though I don't know of any better ways to do so. ... Upload them to the themes/ directory of your Typo installation, and then you can use the admin interface to choose which to use. ...
    (comp.lang.ruby)
  • Re: 1.01 billion images in 0.632 seconds?
    ... image as its being added to their database. ... they'd calculate its hash value. ... that kind of time though - no face matching, ... The above example appeared to take longer to upload the image then it ...
    (alt.html)
  • Re: FTP: .html files dissappear when uploaded to server....
    ... Hash: SHA1 ... >>So how do i make it so a page will upload and stay there? ... For PGP key email with "PGPKey" in the subject ...
    (freebsd-newbies)
  • Re: ftp corrupting my zip file
    ... that worked but the hash toggles so how do know whether to use the hash or ... At the moment I think all the chariage return characters are ... Can anyone tell me how to upload and download a .zip file without it ...
    (microsoft.public.scripting.vbscript)