Re: Detecting File Changes
From: William Ryan eMVP (dotnetguru_at_comcast.nospam.net)
Date: 04/28/04
- Next message: William Ryan eMVP: "Re: How can i play a sound in VB.NET?"
- Previous message: JJK: "Re: XOR operator"
- In reply to: virtualswp: "Detecting File Changes"
- Messages sorted by: [ date ] [ thread ]
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.
- Next message: William Ryan eMVP: "Re: How can i play a sound in VB.NET?"
- Previous message: JJK: "Re: XOR operator"
- In reply to: virtualswp: "Detecting File Changes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|