On 03/30, Jason Sydes wrote:
> For all three of those examples, all the .hidden folders get transferred
> over, even though I specifically don't want them to be transferred (my
> specific application requires the .hidden folder to be transferred at a
> later step, independent of the initial transfer).
>
> (Note: Yes, the correct three "normal" / "desired" files get transferred
> over just fine).
>
> I'm curious if this is a bug, a feature, or if I'm just making a some sort
> of syntactic mistake(s)?
Hi, Jason!
I've noticed the same. It's a real shame. In my experience, the
--include and --exclude options only apply to files, not directories!
You've probably already seen it, but the "Include and Exclude" section
of the "globus transfer" CLI reference
https://docs.globus.org/cli/reference/transfer/
says:
The --include and --exclude options are evaluated in order
together to determine which files are transferred during recursive
transfers. Earlier --include and --exclude options have priority over
later such options, with the first option that matches the name of
a file being applied. A file that does not match any --include or
--exclude options is included by default, making the --include option
only useful for overriding later --exclude options.
For example, "globus transfer --include *.txt --exclude *" will only
transfer files ending in .txt found within the directory structure.
And for the --include and --exclude options, it says:
--include TEXT
Include files found with names that match the given pattern in
recursive transfers. Pattern may include "*", "?", or "[]" for
Unix-style globbing. This option can be given multiple times along
with --exclude to control which files are transferred, with earlier
options having priority.
--exclude TEXT
Exclude files found with names that match the given pattern in
recursive transfers. Pattern may include "*", "?", or "[]" for
Unix-style globbing. This option can be given multiple times along
with --include to control which files are transferred, with earlier
options having priority.
You'll notice that it only talks about files, never directories....
Regards,
Lewis