Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

It is by design, please read documentation:
When the mask selects files and it makes sense to select them based on directory, you can extend the mask with path mask. Separate path mask from filename mask by slash.


I.e. If there is not slash in mask, it is matched only against the last path component. If there is slash, all before the slash is matched against the whole path except for its last component.
Guest

Hi Martin,

I tried this, and it works with absolute paths---thanks.

It also works with relative paths, so long as you precede the path by *, as in
public_html; */public_html/*

However, it doesn't work when you omit the first "*/":
public_html; public_html/*

The second mask does not work, and WinSCP reverts back to the default presets when you navigate into a subdirectory of public_html.

Is this by design?
martin

You need to specify something like "/foo/public_html;/foo/public_html/*". See documentation.
Anton P.

Ah yes, I hadn't fully grasped the functionality of Transfer Presets.

However, there is still one thing that I haven't managed to do: trigger a preset when the remote path contains a specified directory which isn't necessarily the current directory.

For example, I want a preset which is triggered when the current remote directory is

foo/bar/public_html

and when it is any subdirectory, such as

foo/bar/public_html/work/June

etc.

I have tried using various forms in the Remote Directory Mask entry, such as "public_html/*" and so on. But I'm afraid my knowledge of UNIX expressions isn't as good as it should be, so I don't know how to say "when public_html forms part of the pathname"! Could you help me here?

Many thanks
Anton
martin

Re: Transfer options should be per-session not global

Everything what you ask for can be achieved using autoselection of transfer settings presets.
Anton P.

Transfer options should be per-session not global

Hi Martin,

I requested a few months ago that WinSCP should remember different sets of file permissions depending on the transfer target. (This is so that files transferred into web folders can have global read and folder-execute set by default, whereas other files only have user read set by default.)

You said that this would be too difficult to implement --- fair enough. So I thought I could get round the problem by setting up different profiles, which both logged me in as the same user on the same machine, but which had different settings for file transfers.

Unfortunately I have discovered that Transfer settings (under "Preferences") are global, and cannot be varied across profiles. To me this seems strange; every other section of "Preferences" give settings which do seem global in nature, whereas I would argue that transfer settings are profile-specific.

I request that transfer settings be moved from the global "Preferences" area to the profile-specific area that the user sees when he is prompted to choose a profile.

Thanks!