GP SoftwareTwitter
Opus FAQsManualCommandsObjects

Using Synchronize filters with FTP site


#1

One of my main reasons for purchasing Dopus was to help me to synchronize my local machine with my live sites, using its awesome synchronize & FTP capabilities- which I am attempting for the first time today. I am having a few issues with using synchronization filters however...

I use some compiling tools for local development (Grunt) which means that there are various source and cache files that need to be left on my machine and not uploaded. My directory structure looks something like this:

  • application
  • system
  • public_html - .sass-cache
    - build
    - images
    - js
    - node_modules
    - scss
    - .htaccess
    - Gruntfile.js
    - package.json
    - index.php

All the files/dirs in red should NOT be uploaded. How to specify this in a filter? For example, I have tried specifying public/.sass-cache/* to exclude the .sass-cache folder, but then it seems to exclude everything except one random folder several layers in. Other attempts produce similar bizarre and unexpected results. The documentation isn't helping much...

If someone could suggest filter rules for my situation I would be most grateful- thank you :slight_smile:


#2

Sorry I meant I have tried public_html/.sass-cache/* before someone points that out...


#3

I've actually managed what I was trying to do by using full path no match rules containing the wildcard * before and after the folder name I want to exclude. ie. /.sass-cache/ It seems that the subfolder rule is better suited for specifying directories, but seemingly it doesn't work with synchronisation for some reason.


#4

Looks like you've solved it already. You're right, SubFolder clauses do not currently work with Synchronize. (Synchronize only considers files, in a nutshell.)

Full Path or Location clauses are the correct thing to use for the Synchronize tool.

If you don't need the interactive aspects of the Synchronize tool, you could use the Copy or Copy Update All commands instead of it, which can be used in conjunction with a filter to restrict which files/folders are copied. SubFolder clauses will work there, and will speed things up if there are a lot of things in the skipped folders. See How to filter items by location or sub-folder and Filtered Operations if you want to learn more about that approach, and shout if you have any questions.


#5

Sorry, more problems. I'm really losing my patience with the synchronize tool now and have wasted an inordinate amount of time with this already. I just don't get it, it seems to have a mind of its own. Please see the attached screenshot for an example:


Here you can see a list of filter rules I have defined, the source directory on the left, and the results of the synchronization on my FTP directory on the right. Now, please tell me what earthly reason is there that the only folder that it has bothered to copy/upload is the components folder?


#6

If you save that filter, then use it in the Find panel (Tools > Find Files > Advanced) against the left folder, what happens?


#7

I get no results whatsoever...


#8

If it helps, the full path to the root folder of my project containing all the files in question is C:\Users\Inigo\Documents\Local\KHP

(and the screenshot above is inside C:\Users\Inigo\Documents\Local\KHP\public_html)


#9

I must be missing something really obvious here. I can't even get a simple find operation to work using a single filter rule. Here's another screenshot of what I mean:


Please note the folder on the left, the filter rule that I'm running at the bottom, and the results on the right (empty). I would expect this to be displaying the public_html folder with all its contents. Why am I not getting that?


#10

Turn on Search inside subfolders.

BTW, the image host you're using doesn't allow linking, so I've been moving the screenshots to the forum. You can upload screenshots directly to the forum by clicking Full Editor & Preview (next to Submit) and using the Attachments tab below the post editor.


#11

OK, Leo, thanks. Perhaps we're getting somewhere now. I understand now that I either need to remove a wildcard from the right, ie *\public_html instead of *\public_html*, or as you say, make it search inside all the folders as well.

So is there an equivalent of 'search inside subfolders' for sync as well? With regard to my first screenshot, how would I make this work?

Thanks for the image attachment tip- will do this next time.


#12

Sorry, the equivalent of course is "synchronize subfolder contents" - which as you can see, I already had turned on.


#13

That's it, I've had enough. I'll leave you with one more screenshot which hopefully allows you to sympathise with my frustration here:


Please, somebody, LOOK at the filter and settings and tell me WHY it has outputted those folders on the right??

Note:

Path to the root folder: C:\Users\Inigo\Documents\Local\KHP
Filter: "Only match things that have [anything]\KHP\app[anything] in their full path name"

So, unless I'm missing something here, that should ONLY match the app folder in the above screenshot, right?

Nope. Look at what it's given me on the right there! OK, so let's investigate shall we, (I mean, we have to assume that somewhere in those folders there must actually be adjacent segments of the path name that matches our filter *\KHP\app*)- so, let's dig into what's in the public_html folder... here's the full path to the end of one particular folder branch that it's decided to match:

C:\Users\Inigo\Documents\Local\KHP\public_html\components\jquery\src\sizzle

Can you see \KHP\app\ in there? I can't.

Here's another, in the vendor folder this time:

C:\Users\Inigo\Documents\Local\KHP\vendor\composer\e91d6a3b

What on earth in that filter rule has caused this arbitrary folder to be outputted? Just utterly ridiculous.

Sorry for the rant but given the amount of time I have wasted with this now I am pretty annoyed. Look, all I want to be able to do is tell it which folder trees to synchronize and/or which ones not to. It was only after a lot of research into a solution that could help me sync FTP sites with my local XAMP server that led me to take the leap to purchase Dopus- something which I am now seriously regretting- and unless someone can help me then I'm afraid I'll be extirpating it from my machine for good and reverting to Xplorer2.


#14

Had you actually clicked the Compare button to start the sync process when you took that screenshot?

Clicking Compare would normally put the file displays into a special mode with checkboxes that show you (and let you control) which files are being copied, deleted, etc, and that screenshot shows no sign of it.

Any filters you've set up won't take effect until you actually click Compare.


#15

Hi, Jon. Yes, the above screenshot was the result of having gone through the compare -> synchronize process. I realise that the compare mode produces checkboxes which allow you to manually select/deselect files and folders but of course that rather defeats the point of writing complex filters to do it automatically.

Sorry for the ranting post yesterday which was written after many hours of frustration. I had a little more luck after reading up and using regexes (still not without issues though), but I still have no clue as to why the wildcard system is not working as I would expect- as illustrated in that screenshot.


#16

I have just made a screen capture of the same sync process as the above screenshot- please have a look at the video file in which you can see all the settings, the process of compare mode, synchronization, and end result. Perhaps you'll be able to tell me what it is that I'm doing wrong. Thanks.

Screen.mp4: dropbox.com/s/cyenpr90p4czo ... n.mp4?dl=0


#17

If anyone has a chance to take a quick look at that video and let me know if there's anything immediately obvious that I'm doing wrong it would be hugely appreciated. Thanks.


#18

I've been able to reproduce this, thanks for the report. The next update should rectify this issue.


#19

Thanks for looking at this, Jon, and good to know that it's not just me stupidly overlooking something obvious (which is usually the case!) I'll look forward to the next update.

FYI, I've noticed that in many situations (also using regex) that the .git folder in particular consistently causes problems.


#20

The beta 11.15.3 is now available. Please let us know how you go!