PDA

View Full Version : Compare file size between Drive and Ftp server


SeekneSs
28-Apr-2005, 06:55 AM
Hi,

I'm trying to put up an automatic sync between a couple of directories and those on an ftp server using the command line.

What i noticed is: the script doesn't compare same files with same timestamp but with different file size.

So, when a file isn't completely loaded up but has same timestamp and different size, that file will be skipped next time these 2 sides will be synced...

This is the script:

filter %1
load %2 %3
expand all
select all

select left.newer.all left.orphan.all left.empty.folders
copy left->right
select right.orphan
delete right

should i use the criteria option together with select.diff?
Tried that, but it didn't worked...

Can someone give me some advice on this one? and in case i have to use criteria, were should it be placed in the script?

thanks!

SeekneSs
28-Apr-2005, 06:57 AM
oops, wrong place to post this... it should be under scripts... :eek:

SeekneSs
28-Apr-2005, 07:32 AM
I used this as a solution... is this the best one?

select right.diff
delete right

select left.newer left.orphan left.empty.folders
copy left->right
select right.orphan
delete right

chrroe
28-Apr-2005, 08:36 AM
Hi seekness!

Have you ever considered using the sync command in your script?


Bye
Christoph

Chris
28-Apr-2005, 12:05 PM
Here's an equivalent script using the sync command:

criteria timestamp size
filter %1
load %2 %3
expand all
sync visible mirror:lt->rt

SeekneSs
29-Apr-2005, 12:42 AM
ok, thanks all !