View Full Version : File Sync
Pilotwings_64
08-25-2009, 12:45 AM
I'm thinking of using file/folder synch software. For a while most of the changes I make will be name changes to large files. Since I notice the software I have tried runs only when I want to sync (not all the time) I would guess that a renamed file would just be viewed as a new file, and the synch software would delete the old one and copy the exact same file under the new name over my network. This would take a long time.
I would like to know if there is a sync software that will simply realize I made a name change, not a new file, and change the name. Is this something that exists?
Paul Komski
08-25-2009, 05:27 AM
If you rename a file then, to all the backup/sync software that I know about, it will become recognised as a new file and dealt with according to whatever rules have been invoked.
Pure synchronisation software should do just what it says and keep two folders synchronised; one being the template and the other being the copy. Depending on the software in question, such synchronisation can be done manually, scheduled or in response to various events.
You seem to be asking for software that will rename rather than copy in order to avoid the physical and unnecessary copying of your large, otherwise unmodified, files. I would suggest you either manually rename both at the same time or else use something like a batch file to rename both as a single manoeuvre.
The following is the sort of thing that should do this. You would just modify the paths and file names appropriately in the set statements. Make sure you leave a trailing \ at the end of the paths and don't modify the last two lines starting ren at all; they should just have those two single spaces in them. It wouldn't be very hard to write a program in VB that would let you select the folders and original filenames from dialog boxes - but that would be another day's work.
@echo off
set FolderA=C:\original\
set FolderB=F:\synchronised\
set Filename1=aaa.txt
set Filename2=bbb.txt
ren %FolderA%%Filename1% %Filename2%
ren %FolderB%%Filename1% %Filename2%
Sylvander
08-25-2009, 07:58 AM
I'm no expert on this, but...
1. I'm using the FREE version of SyncBack, and I can see the following...
2. After I have made various profiles...
(a) If I click on one to highlight it, I can then go to...[Right-click], then "Modify".
(b) Then click the "Advanced" tab...
(c) Then click the "Expert" button...
(d) Then click the "Compare Options..." tab...
This allows the user to use various specialized methods of comparing folders & files.
I notice the help files DO NOT SAY that the various attributes are only compared AFTER [or on the basis of] COMPARING THEIR [ADDRESS AND] NAME.
Read the help files and see what you think.
e.g.
(e) TICK: "Use slower but more reliable method of file change detection".
QUOTE FROM THE HELP FILES:
"File size: All files record the number of bytes they contain.
Hash value: A unique value can be computed based on the contents of a file. These values can be used to check if a files contents is the same as another's.
You have the option to not use some of these methods, and also change how they are used.
Ignore file modification date & time changes: You can tell SyncBack to completely ignore the last modification date & time of a file. Ignoring the date & time has no impact on performance.
Use slower but more reliable method of file change detection: By default, SyncBack will not compute the hash value of a file. The reason is that it can dramatically increase the time taken for a profile to run. However, if you want to be absolutely certain that SyncBack detects if a file has changed, so that it is copied, then you can enable this option. The only reason to enable this option is if you do not trust the last file modification date & time of the files, and the file size may not change."
So IF SyncBack DOESN'T compare the attributes only of files with the same [address and] name...
By ignoring the date & time changes, the change of name would be ignored.
And then it would look only at those things it was configured to compare.
What d'you think Paul?
[I'm hoping to learn about this and make it clear in my own mind]
Pilotwings_64
08-25-2009, 05:47 PM
Paul.
I have a program called Flash Renamer. I have thought about using it on two identical folders at the same time. I just don't know how quick it would be. Thank you for the suggestion. Even doing that manually would be better than waiting for a 500 GB folder to be deleted and copied over again just because it was renamed in the source folder only. I'm not sure where to put the code if I use your option. Do I put it in the "run" dialog box? I'll try Flash Renamer first though. Thanks again, Paul.
Sylvander
That seems like it could work, but more likely it seems like this hash check is done only on files with the same name. Otherwise the program would have to compare every hash check with every other flash check. It seems like that option is for people who don't trust windows "last modified" record. I also would not use this option because one of the reasons I want to back up my data is incase it gets corrupted on one hard drive. That's why I'm using sync software. Copying over all of my files every day would take a long time and it would also copy any corrupted files from the source. Performing a hash check with the sync software would cause that same problem. If a file was corrupted it would be different, therefor it would copy over.
Thanks for the suggestion though. Sometimes the best advice comes from people who have checked out parts of programs few others know about.
Paul Komski
08-25-2009, 11:23 PM
A batch file is written in any pure text editor such as notepad and saved with a .bat file extension and that thus transforms the file into an executable file; (or, if you prefer, a series of executable commands in sequence line by line). Thereafter you run/open the file by double clicking on it just as you would run/open any executable.
http://en.wikipedia.org/wiki/Batch_file
http://commandwindows.com/batch.htm
I don't believe that the syncback option to use a hash value will make any difference at all since the hash value (in the same way that MD5 checksums are used to check on the integrity of the data in an ISO file) is computed on a named files's data and not on any of its attributes which are kept in a separate area. The starting point for comparison has to be the file name otherwise the hash value of every file in the source folder would need to be compared with every file in the target folder. The last modified date is the most obvious value to check to see if a file's data has changed in the interim but a hash value would detect even a single byte having been changed and would show up a change, for example, where a bad sector had developed in one of the two files being compared.
When a named file is copied from one source to another then windows automatically compares the source and target file size or the copy is not made. But this doesn't mean that source and destination will remain the same either because of later data or file system corruption or because some modification is made to source or destination file. Change one letter in a text file does not change its file size but does change its hash value.
vBulletin v3.6.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.