Automatically select transfer setting preset - for subdirs

Advertisement

dandv
Guest

Automatically select transfer setting preset - for subdirs

Automatically selected transfer presets are a great feature - I can configure WinSCP to automatically transfer in text mode and exclude CVS directories, or .svn-base etc. once I navigate to a specific remote directory.

But when I enter a subdirectory of that directory, WinSCP returns back to the default transfer settings.

This is a request for a very simple feature: would it be possible to either:
  • allow directory masks to match beyond the first subdirectory? For example, right now "*mycoolapp* matches /home/dandv/mycoolapp, but does not match /home/dandv/mycoolapp/lib.
  • have an "apply to subdirectories" checkbox in the "Edit transfer settings preset" dialog

Personally, I would prefer the first option.

HTH,
Dan

Reply with quote

Advertisement

dandv
Guest

Thanks, that works, but only for immediate subdirectories.
  • /home/dandv/mycoolapp/ matches
  • /home/dandv/mycoolapp/lib matches
  • /home/dandv/mycoolapp/lib/schema doesn't match

How can I have the preset be automatically selected on any subdirectory of /home/dandv/mycoolapp, recursively?

From the documentation, I understand that specifying two patterns is done because one matches a directory and the other one matches files.

The syntax I expected for the Directory masks (where no files are concerned) was that of web server rules for matching URLs (which have similar paths). That is, simplified regular expressions. '*' matches any character, including '/', and to match only up to some directory, one could use a final '$':

/mycoolapp/*/subdirs_of_this_dir_contain_binary_files$

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Automatically select transfer setting preset - for subdirs

OK, this should do:
/home/dandv/mycoolapp;/home/dandv/mycoolapp/*;/home/dandv/mycoolapp/*/*
Unfortunatelly it is bit too complex :-(

Reply with quote

Advertisement

You can post new topics in this forum