Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: .NET
I need a program which gives file name under editing mode. I am making backup program and I need to find difference between file before editing and file and file after editing.
 
File locking is not problem with me.
Posted 29-Sep-12 19:38pm
Comments
Sandeep Mewara at 30-Sep-12 2:38am
   
And where are you stuck while trying to make such program?
Member 4643583 at 30-Sep-12 12:38pm
   
I need algorithm to generate delta of modified content. Algo if we compare complete backup file then itt consume high network bandwidth. This is my problem.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

In my opinion there's two things you could do.
First, and possibly preferent, you could compare the date at which a file was last edited with the date of the file in your backup system. If the file on the machine is newer than the one in your backup system you need to back it up. If a file is not present in your backup system at all you need to back it up too.
Second, you could use a FileSystemWatcher[^] to be notified the moment a file is created, updated, deleted etc.
How you are going to realize any of these (or other methods) is up to you.
Hope it helps! Smile | :)
  Permalink  
Comments
Member 4643583 at 30-Sep-12 12:36pm
   
Yes but i need a alorithm to gerenate delta of difference between previously backed file and new file.
Member 4643583 at 30-Sep-12 12:39pm
   
I need algorithm to generate delta of modified content. Algo if we compare complete backup file then itt consume high network bandwidth. This is my problem.
Naerling at 30-Sep-12 17:03pm
   
Sorry, that's not what I understood from your question. Anyway, if all you need to do is backup files I'd say the only thing you need to send through the network is the date of the file and the file if the dates differ. AFTER you've compared the dates you can send the file and compare it. I can't help you with the algorithm necessary to compare two files. This is specialized work and if I could do it I would probably be making a lot more money at some big company :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 472
1 sanket saxena 355
2 CPallini 205
3 thatraja 200
4 OriginalGriff 195
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 30 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid