How to always filter some files and folders during transfer following sym links Linux -> Windows?

Advertisement

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

How to always filter some files and folders during transfer following sym links Linux -> Windows?

I need to transfer all folders, except for one where only a subset of files and folders are needed.
I tried the following filter mask, but it does not work as expected: nothing is transferred from the exception folder.
My understanding is that the file search is not recursive in the source folder: how can the mask be modified to attain the goal?

For example, the Ubuntu/*.sh files are located within numerous subfolders.

Another issue is that the mask is not automatically set for the next transfers: we have to reload it each time.
Last edited by jcmanciot on 2016-05-31 21:56; edited 2 times in total

Description: WinSCP transfer options

WinSCP transfer options.JPG

Description: WinSCP transfer filter mask

WinSCP filter mask.JPG

Reply with quote

Advertisement

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

Re: How to always filter some files and folders during transfer?

martin wrote:

This should do: |Ubuntu/*.sh;Ubuntu/*/*.sh
With the following mask ("Filter mask"), the whole subfolders match, instead of a collection of files within some of them:
To give you a glimpse of what is available in the source folder, we have:
find Ubuntu -name "build*.sh" | more
Ubuntu/Libguestfs/build-libguestfs.sh
Ubuntu/Google/Authenticator/build-google-authenticator.sh
Ubuntu/Celt-Codec/build-celt.sh
Ubuntu/Libpcap/build-libpcap.sh
Ubuntu/Git/build-git.sh
Ubuntu/Spice/GTK/build-spice-gtk-stable.sh
Ubuntu/Spice/GTK/build-spice-gtk.sh
Ubuntu/Spice/VD-Agent/build-spice-vd-agent.sh
Ubuntu/Spice/Server/build-spice-server.sh
Ubuntu/Spice/Protocol/build-spice-protocol-dev.sh
...
As you can see, some *.sh are within "subsubfolders"; do they have a chance to get on board? ;)
I believe there should be a simple "recursive" option for the files instead, like a classic -R in Linux.

martin wrote:

To set the mask permanently, set the defaults in the Preferences:
https://winscp.net/eng/docs/ui_pref_transfer
(or use Transfer Settings > Set as default on Upload/Download dialog)
I saw the defaults for all sessions, but I could not locate the "default" on Upload/Download dialog" ("Sync Checklist")

Sync Checklist.JPG

Filter Mask.JPG

Reply with quote

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

Two more issues with filtering.
1) Timestamps
There are some discrepancies between source and dest ("Date & Time Discrepancies").

2) Excluding a folder or not
Excluding "Ubuntu" folder leads to nothing to do ("Without Ubuntu Filter Mask" & "Without Ubuntu Sync Results").
However, including all folders lead to some job outside of "Ubuntu" folder ("With Ubuntu Filter Mask" & "With Ubuntu Sync Results", cf. next post).

Without Ubuntu Sync Results.JPG

Without Ubuntu Filter Mask.JPG

Date & Time Discrepancies.JPG

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: How to always filter some files and folders during transfer?

Now, I'm not sure what you want to do.
Do you want exclude the .sh files or transfer only the .sh files?

For the timestamp problem, start here:
https://winscp.net/eng/docs/troubleshooting#timestamps
If that does not help, please collect the information mentioned in the article and start a new thread about this issue.

The Ubuntu directory exclude mask excludes all Ubuntu folders. So even the .\Issues\Ubuntu, not only the .\Ubuntu. If you want to exclude a specific folder only, use a full path.
See https://winscp.net/eng/docs/file_mask#path

Reply with quote

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

Re: How to always filter some files and folders during transfer?

martin wrote:

Now, I'm not sure what you want to do.
Do you want exclude the .sh files or transfer only the .sh files?
The Ubuntu directory exclude mask excludes all Ubuntu folders. So even the .\Issues\Ubuntu, not only the .\Ubuntu. If you want to exclude a specific folder only, use a full path.
See https://winscp.net/eng/docs/file_mask#path
I'm trying to recursively transfer all *.sh which are located inside ./Ubuntu
Whether I put the source whole path from the root or the partial path from the current sync folder, the results are the same: WinSCP tries to transfer all subdirectories, instead of just *.sh located inside all subdirectories and all subsubdirectories and so on ("Whole source path" and "partial source path"). At least, that's how the results are shown on the "synchronization checklist".

martin wrote:

For the timestamp problem, start here:
https://winscp.net/eng/docs/troubleshooting#timestamps
If that does not help, please collect the information mentioned in the article and start a new thread about this issue.
New issue then.

Description: partial source path

current-path.jpg

Description: Whole source path

whole-path.jpg

Reply with quote

jcmanciot
Donor

OK, I removed the escape character; however, the issue remains: WinSCP wants to sync the whole Ubuntu folder even when specifying the whole path: /home/actionmystique/Google Drive/Ubuntu/*/*.sh

Reply with quote

Advertisement

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

OK.

Please note that I could not perform the transfer (I cancelled at the sync checklist) because WinSCP is not able to apply the filter mask correctly.
Since the whole "Ubuntu" folder is selected by WinSCP instead of the filter, the destination space would not have been sufficient to hold all the data.

Transfer Settings.JPG

Filter Mask.JPG

Reply with quote

Advertisement

martin
Site Admin
martin avatar

WinSCP updates the folder timestamp only, when it touches the folder. There was no change in the Missings folder, so the timestamp was not updated.

Reply with quote

martin
Site Admin
martin avatar

jcmanciot wrote:

It should sync all folders timestamps, since the transfer type is "mirror".
Is that a feature request? Will see if more users ask for it.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

I understand that you want to have the timestamps synchronized too.
But we never claimed to mirror directory timestamps. WinSCP mirrors files only, atm.

Reply with quote

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

I've tried the filter feature with symbolic links with the latest 5.8.3 RC (build 6701), and the issue is still there.

BTW,
"Help > Check for updates" does not show new RCs when we already have a dev version installed.
Also, opting in "log automatically on at each visit" does not work after a reboot.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

jcmanciot wrote:

I've tried the filter feature with symbolic links with the latest 5.8.3 RC (build 6701), and the issue is still there.
What issue do you mean specifically? I believe there was no issue discovered in this thread.

"Help > Check for updates" does not show new RCs when we already have a dev version installed.
Do you mean that you had dev version 5.8.3 installed and it did not show the official 5.8.3?

Also, opting in "log automatically on at each visit" does not work after a reboot.
Do you mean the option on this forum?

Reply with quote

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

martin wrote:

What issue do you mean specifically? I believe there was no issue discovered in this thread.
https://winscp.net/forum/viewtopic.php?p=68865#68865; here, /Ubuntu is a Linux symbolic link.

Do you mean that you had dev version 5.8.3 installed and it did not show the official 5.8.3?
I had 5.8.2 RC and it did not show 5.8.3 RC

Do you mean the option on this forum?
Yes

Also, login in when on a thread makes us land on the forum home page when the login is successful.
At last, I have changed the title of this thread in the first post to make it obvious that we are dealing with Linux sym links here. I wish it could have changed the title of all subsequent posts so that the situation is clear to everyone jumping in at any point of the thread.

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

jcmanciot wrote:

martin wrote:

What issue do you mean specifically? I believe there was no issue discovered in this thread.
https://winscp.net/forum/viewtopic.php?p=68865#68865; here, /Ubuntu is a Linux symbolic link.
OK, but we ended up the discussion with me stating that it's not a bug, but maybe a missing feature. And I never claimed it to be implemented. Or am I missing something?

"Do you mean that you had dev version 5.8.3 installed and it did not show the official 5.8.3?
I had 5.8.2 RC and it did not show 5.8.3 RC
The official 5.8.2 beta?

Reply with quote

jcmanciot
Donor
Joined:
Posts:
26
Location:
Paris, France

martin wrote:

OK, but we ended up the discussion with me stating that it's not a bug, but maybe a missing feature. And I never claimed it to be implemented. Or am I missing something?
Yes you are mixing up 2 separate issues (I should have not written about the second one in the same thread, but I redirected it to its own separate thread https://winscp.net/forum/viewtopic.php?t=22804 afterwards):

1) filtering files during transfer from Linux symbolic links -> Windows:
Not correctly done

2) mirroring folders timestamps:
You said it is so far an unsupported feature, unless some other people ask about it.

I'm focusing only on the first issue here.

The official 5.8.2 beta?
I received a RC following a bug report. Nevermind, this is not very important.[/list]

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

jcmanciot wrote:

martin wrote:

OK, but we ended up the discussion with me stating that it's not a bug, but maybe a missing feature. And I never claimed it to be implemented. Or am I missing something?
Yes you are mixing up 2 separate issues (I should have not written about the second one in the same thread, but I redirected it to its own separate thread https://winscp.net/forum/viewtopic.php?t=22804 afterwards):

1) filtering files during transfer from Linux symbolic links -> Windows:
Not correctly done
Well, you are mixing up two separate issues.

Anyway, so it did work in the dev version, I've sent you, but it does not work in the released 5.8.3?

Reply with quote

jcmanciot
Donor

martin wrote:

Anyway, so it did work in the dev version, I've sent you, but it does not work in the released 5.8.3?
It never worked, neither in 5.8.2 nor in 5.8.3.

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum