Mirror a directory (including removal of files no longer present)

Need help with FileZilla Client? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Mirror a directory (including removal of files no longer present)

#1 Post by Macktek » 2016-03-03 22:51

Is there a way to force FileZilla to Mirror a directory and delete files no longer present (while also skipping files if they have the same date and time stamp?
For example:

Assume Server has:
Test/Foo_001 Date: 1/1/2016
Test/Foo_002 Date: 1/1/2016
Test/Foo_003 Date: 1/1/2016

And Client has:
Test/Foo_001 Date: 1/1/2016
Test/Foo_003 Date: 1/1/2016

And it is desired to Mirror the contents of Client's Test folder to Server.
We would want the server to Skip Test/Foo_001 and Test/Foo_003 since they have the same date and time stamp.
While at the same time it should automatically delete Test/Foo_002 since its no longer in the client directory.

Aside from manually deleting the entire folder to start with, is there a way to do this that is relatively automatic?

Thanks for any assistance.

User avatar
boco
Contributor
Posts: 26939
Joined: 2006-05-01 03:28
Location: Germany

Re: Mirror a directory (including removal of files no longer present)

#2 Post by boco » 2016-03-04 04:43

You can enable directory comparison (menu View) together with the "Hide identical files" sub-option. Everything that's still showing is not identical. It should then be easy to delete the excessive files.

If you mean fully automatic, then No.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org

Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Re: Mirror a directory (including removal of files no longer present)

#3 Post by Macktek » 2016-03-04 16:00

Thank you.
As far as I can tell tho, this works for only the current directory.

When I switch directories the compare automatically turns off.

Manually hunting thru each directory would be egregiously time consuming considering the number of files and directories I would need to check.( its in the thousands)

Is there a way to recursively compare sub directories and their files?

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Mirror a directory (including removal of files no longer present)

#4 Post by botg » 2016-03-04 16:39

When I switch directories the compare automatically turns off.
Have a look at the synchronized browsing feature, it works in combination with directory comparison.
Is there a way to recursively compare sub directories and their files?
There is no recursive compare.

Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Re: Mirror a directory (including removal of files no longer present)

#5 Post by Macktek » 2016-03-04 16:47

Turning on the Synchronized Browsing feature does help to some degree.
But...
I am talking thousands of files... and hours of sifting thru the directories one by one.

A recursive system would be welcome.

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Mirror a directory (including removal of files no longer present)

#6 Post by botg » 2016-03-04 17:27

Just great. Look at what you've done... :wink:

It's Friday evening and I can't relax because my mind keeps thinking on how to integrate comparison into the search functionality.

Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Re: Mirror a directory (including removal of files no longer present)

#7 Post by Macktek » 2016-03-04 17:59

heheh
Sorry man...

If its any help, PM me with what you feel is a decent donation...

:)

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Mirror a directory (including removal of files no longer present)

#8 Post by botg » 2016-03-09 09:59

You've opened a can of worms.

I'm having to refactor substantial parts of FileZilla's transfer queue just to get the foundation of this feature into place.

It's surprisingly complicated code I haven't touched in years.

Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Re: Mirror a directory (including removal of files no longer present)

#9 Post by Macktek » 2016-03-12 17:00

(Sorry) :mrgreen:
If its any consolation, it will be a cool feature.

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Mirror a directory (including removal of files no longer present)

#10 Post by botg » 2016-05-31 10:35

Part two, the local search, is now available.

Now all that remains is the simple *cough* task of combining the two searches.

Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Re: Mirror a directory (including removal of files no longer present)

#11 Post by Macktek » 2016-06-02 00:06

Awesome!

Macktek
550 File not found
Posts: 33
Joined: 2016-03-03 19:04
First name: Mack

Re: Mirror a directory (including removal of files no longer present)

#12 Post by Macktek » 2017-01-13 06:47

Been away for a while, can anyone tell me if the Mirror feature has been implemented?

User avatar
botg
Site Admin
Posts: 35566
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

Re: Mirror a directory (including removal of files no longer present)

#13 Post by botg » 2017-01-13 09:16

No, not yet.

Post Reply