Jump to content


Photo

Filters aren't working


This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1 JMM

JMM
  • Members
  • 21 posts

Posted 28 April 2010 - 04:05 AM

I'm having a problem with filters in SmartFTP 4.0.1072.0 on Windows XP Home SP3. Neither include nor exclude filters are working at all. With either of the following filter configurations, SmartFTP still happily transfers "example.css":

Options = Enable

Filter List = Use Favorite's Settings

Type = Include

WildChar / *.html / File (Name)

WildChar / *.php / File (Name)

Posted Image

OR


Options = Enable

Filter List = Use Favorite's Settings

Type = Exclude

WildChar / *.css / File (Name)


Am I missing something glaringly obvious here?

#2 mb

mb

    Developer

  • Administrators
  • 11521 posts

Posted 28 April 2010 - 04:06 AM

Filters are only applied to folders that are already in the transfer queue. If you manually add a test.css file, the filters do not apply.

#3 JMM

JMM
  • Members
  • 21 posts

Posted 28 April 2010 - 04:27 AM

Can you please elaborate on what you mean by "already in the transfer queue"? Or, can you please just explain the steps I need to take to transfer files and have the filters applied?

Is there documentation somewhere explaining the role of the transfer queue and how to use it?

#4 mb

mb

    Developer

  • Administrators
  • 11521 posts

Posted 28 April 2010 - 04:31 AM

If you select a file called bla.css in the remote browser and drag it over to the local browser it will be added to the transfer queue and no filters are applied.

If you download a folder and it contains a file bla.css then this file will get filtered.

#5 JMM

JMM
  • Members
  • 21 posts

Posted 28 April 2010 - 06:16 PM

I'm getting really inconsistent results from the filtering feature.

I want to update all of the *.html and *.php files throughout the directory tree of my website. I want SmartFTP to traverse all of the subdirectories and transfer all of those files, overwriting any that already exist. I don't want it to transfer any other type of file (e.g. *.css).

I assume that is possible with the filters, or else I don't understand what the filters do. Is that possible? If not, what do the filters do?

I've performed some tests using a greatly simplified version of my actual file tree: smartftp_filters_tree.zip

Obviously if there were just one *.html file that I needed to update, I could just manually transfer and overwrite that one file. But I have many files of different types throughout many subdirectories, so I need an automated way to transfer and overwrite just certain files without disturbing others.

For this simplified test the goal is to transfer the "docroot" folder and have just docroot/inside/ui/standard/example.html overwritten, without having to tell SmartFTP what to do with each individual file. Although this is a greatly simplified version of my actual problem, I've been unable to get SmartFTP to do that.


I performed the tests by doing the following with the above file tree:

* I disabled filters and opened a remote browser.

* I uploaded "docroot" to the FTP server.

* I changed all of the local files, but not the directory stucture.

* I enabled filters, closed the remote browser, and reopened it.

* I made "home" my current directory in both my local and remote browsers, and then dragged "docroot" from local to remote.

* In all cases the first prompt I received was the Confirm Folder Replace dialog, for which I selected [Merge + Do this for all conflicts].


Here are some of the things I observed:

*** 1 ***

With the following filters:

WildChar / *.html / File (Name)

WildChar / * / Folder (Name)


When transferring "docroot", SmartFTP encounters docroot/inside/example.css and prompts whether to Copy and Replace, Don't copy, etc. the file, despite the fact that no *.css file should be transferred at all according to the filters.

Choosing [Don't copy + Do this for all conflicts] is not an option, because then the *.html files that are intended to be overwritten won't be.

Choosing [Copy and Replace + Do this for all conflicts] for docroot/inside/example.css DOES overwrite the file, then continues to overwrite subsequent *.html files, but not subsequent *.css files.

Choosing [Copy and Replace] individually for each *.css file encountered DOES overwrite each file.


*** 2 ***

With the following filters:

WildChar / *.html / File (Name)


When transferring "docroot", SmartFTP works its way into the subdirectory structure until it encounters docroot/inside/example.css, then displays the Copy File dialog (Copy and Replace, Don't copy, etc.) even though no *.css file should be transferred at all according to the filters.

Choosing [Copy and Replace + Do this for all conflicts] for docroot/inside/example.css DOES overwrite the file, then does not overwrite any files deeper in the subdirectory structure, even the *.html files included by the filter.

If docroot/inside/example.css is removed and the test is repeated, SmartFTP descends to docroot/inside/ui/standard/example.css and then displays the Copy File dialog. Once again if [Copy and Replace + Do this for all conflicts] is chosen, SmartFTP DOES overwrite the file and then will the overwrite the example.html file in the same directory.



It seems to me that SmartFTP displaying the Copy File dialog for the first (or any) *.css file and forcing it to be overwritten to get any of the subsequent, intended files to be transferred and overwritten is a definite problem. Perhaps the problem is limited in scope to that. It's hard to say though, because I've been performing these tests with a much simpler file tree than my real one. If that problem weren't happening and I then tried the transfer with my real, more complex file tree it's possible that other problems would then manifest.

#6 mb

mb

    Developer

  • Administrators
  • 11521 posts

Posted 28 April 2010 - 06:30 PM

You may want to test it with the latest beta version:
http://www.smartftp....et/SFTPBeta.exe

#7 JMM

JMM
  • Members
  • 21 posts

Posted 28 April 2010 - 06:50 PM

Yeah, but that would be an additional hassle on top of the considerable amount of time I've already spent debugging it. Would you look into it please? If it's a bug (which it seems like to me) and a newer release fixes it, then I'll upgrade. If it's not a bug, then I must not understand how the feature is supposed to work and I need to be pointed to some documentation or have an explanation of how it works, please.

#8 mb

mb

    Developer

  • Administrators
  • 11521 posts

Posted 28 April 2010 - 07:16 PM

I'm sorry but I do not understand your problem. Please try it with the latest version, it corrects some bugs that might be related to your findings.

#9 JMM

JMM
  • Members
  • 21 posts

Posted 29 April 2010 - 01:30 AM

I installed the beta.

I repeated test #1.

When transferring "docroot", SmartFTP encounters docroot/inside/example.css and prompts whether to Copy and Replace, Don't copy, etc. the file, despite the fact that no *.css file should be transferred at all according to the filters.

I didn't proceed any farther, because as far as I can see, that's a bug right there.

I forgot to mention before, the FTP server is ProFTPD 1.3.2c.

#10 mb

mb

    Developer

  • Administrators
  • 11521 posts

Posted 29 April 2010 - 03:32 AM

This is by design and it's exactly what I tried to explain before. Filters are only applied to folders that are in the transfer queue. If you manually transfer a bla.css file the filters do not apply and you are prompted if you want to transfer it. If you select skip in the file exist dialog then the file will be skipped, if you select copy then the file will be copied. If you select "Use Automatic Rules" the file will still be transferred. However if you transfer a folder and then select "Use Automatic Rules" in the folder exist dialog, the .css files inside this folder will be skipped.

What can be discussed is whether the filters should be applied to files when you select "Use Automatic Rules" in the file exist dialog.

#11 JMM

JMM
  • Members
  • 21 posts

Posted 29 April 2010 - 05:08 AM

Are you kidding me?

After my original description of the problem you told me "If you download a folder and it contains a file bla.css then this file will get filtered." I tried that and it still didn't work the way I expected, so I provided a detailed description of the action I was taking and the results and your entire response was "You may want to test it with the latest beta version". Then I asked you to please look into the problem, or if I misunderstood the feature to please explain how it works, and you insisted that I try the beta version.

So I tried the beta version and posted again. I didn't add anything new to my description of the action I took and the results. I repeated exactly the same action that I described in detail before you told me to try the beta.

So why did you insist before that I needed to try the beta version, and now you're telling me the behavior is by design? If it's by design, you should have told me that before instead of insisting that I needed to try the beta. That's why I described the problem in detail, so there'd be no confusion and you could tell me if I was doing something wrong or if SmartFTP was behaving incorrectly.

If the behavior of my current version (which I described in detail) was by design, what was the purpose of you telling me to try the beta? How could that possibly have done anything to resolve my problem if the behavior I described was by design and not an error?


If you manually transfer a bla.css file the filters do not apply and you are prompted if you want to transfer it.


I didn't manually transfer a bla.css file. As described in detail in my post #5, I transferred a folder that contains a bla.css file. Then I'm presented with a file exist dialog for the bla.css file. Why would I even be presented with that dialog for a file that should be excluded by the filters?


However if you transfer a folder and then select "Use Automatic Rules" in the folder exist dialog, the .css files inside this folder will be skipped.


Are you saying that if I select "Synchronize using Automatic Rules" in the "Confirm Folder Replace" dialog, then the filters will be applied to the files within the folder?

If that is the case, how would I know that? I haven't seen that explained anywhere, including in How To selectively transfer files. Why didn't you tell me that before? I described exactly what I was doing and what the results were and then you told me I needed to try the beta...because "it corrects some bugs that might be related to your findings".

Earlier than that you said "If you download a folder and it contains a file bla.css then this file will get filtered." You never mentioned anything about needing to select "Use Automatic Rules" to get the filters to apply.

The "Confirm Folder Replace" dialog says the following under "Synchronize using Automatic Rules": "The file will be resumed, overwritten or skipped according to the preconfigured file exist rules in the favorite".

That sounds to me like it's referring to the rules in the File Exists section of the favorite properties. So when do the filters come into play? Before those rules are applied? After?

I don't want the transfers based on hashes or file size, modification time, and transfer type. I want to be able to overwrite all files that are included by the filter. Is that possible?

#12 JMM

JMM
  • Members
  • 21 posts

Posted 05 May 2010 - 10:38 PM

BUMP