|
#1
|
|||
|
|||
Copy Files -- Exclude Problem
Hello --
I'm having a problem setting up exclusions for a "Copy Files" operation. The problem is that it seems to ignore a directory specification that includes multiple levels, such as "\output\docs". Now it works just fine if I specify just "\output" or "\docs", but not both. And I really need both in my case, as I have other "\docs" directories that I want to keep as well as other sub-directories under "\output" Any ideas? |
#2
|
|||
|
|||
The Copy Files action include/exclude filters don't currently support multiple levels of folders (although it's on our list, probably in the next release). For now, you would need to use something like RoboCopy for that.
http://www.microsoft.com/downloads/d...displaylang=en |
#3
|
|||
|
|||
This seems to be working in the 6.2 beta, though I must specify to exclude "\output\docs\" (with the trailing backslash) rather than just "\output\docs". But this makes sense because it's ambiguous otherwise if "docs" is a file or a directory.
Thanks for supporting this advanced funtionality. |
#4
|
|||
|
|||
I need to revise my previous statement -- this feature is mostly working in the 6.2 beta. The problem I'm seeing is that it still creates an empty directory for this folder that I told it to exclude. Yes, I do have "Copy empty subdirectories" checked, but exclude should mean exclude.
Also, there appears to be no way to specify which folders to include. Suppose I wanted to include folders at the root level starting with "B" (I specify "\B*\*.*"), this does not seem to work. It includes all folders and ignores my INCLUDE filter. |
#5
|
|||
|
|||
The exclusion issue has been fixed in the latest beta download.
Folder inclusion works ok in my tests (sample attached). |
#6
|
|||
|
|||
Yes -- the latest beta seems to have resolved this issue. Also, I no longer seem to need the trailing backslash for my exclusion list (which I’m glad about). Thanks for fixing those.
But one new issue pops up: how can I copy folders of a particular (such as those starting with B) which are located only in the source folder root? I've tried \B*, but this will also pick up folders such as "_Flash_\Bxxxxx", which I don't want. Any suggestions? |
#7
|
|||
|
|||
Specifying /B* will perform #2 broad (old-style) folder matching (as documented in the 'File Inclusion/Exclusion Matching' help topic), which matches folders starting with B at any level.
Specify /B*/* to use #3 advanced matching to match on files within folders starting with B only at the root of the search path. Also note that the beta was updated today with a fix for an issue when combining old- and new-style matching in file processing actions. |
#8
|
|||
|
|||
I have downloaded and installed the beta that was released today, but I’m still have problems with this. All I wish to do is to recursively copy all files in all folders starting with “B” at the root of the search path. When I specify “/B*/*”, I get all folders (including ones that don’t start with “B”). Going back to what I specified previously (“\B*”) yields the same result as my previous post – folders starting with B folders or containing folders that start with B.
The really strange thing, however, is that no actual files are being copied in either case -- only the folders are created. And I assure you that these folders are not empty. I did a little further testing and noticed that part of the problem I’m seeing is tied to Exclude Files. When I specify “/B*/*” for Include but nothing for Exclude, VBP will correctly copy over files only in root directories starting with “B”. However, it will also create empty directories for all directories not starting with “B”. Something’s just not right. |
#9
|
|||
|
|||
Are the files being reported as copied but not really getting copied? Do you definitely have 'Do not copy' on the Options tab unchecked?
There was a problem with the last build regarding exclusions, which was just fixed. Please download and install the beta again, and if any of the problem(s) persist, ZIP and post/send a .bld file that demonstrates the problem (creates folders/files as needed and copy step that reproduces the issues) and a build log file. Thanks. |
#10
|
|||
|
|||
No -- the files were not being reported as copied and not physically copied either. And I definitely do not have the "Do not copy..." option checked. The really odd thing, however, is that all of the folders get created (even the folders I did not request). Just none of the files were copied.
I have downloaded the refreshed beta and tried my test again. Things are now a bit different, but still very broken. The files in root folders matching “/B*/*” are now being copied as I requested, but all other non “B” folders are still being created as empty folders. Also, I have 2 excluded folders which are now being included in the copy operation. I will put together a test script to demonstrate these problems and post it tomorrow morning. |
#11
|
|||
|
|||
Here is my test script to demonstrate the problems. I've also noticed that it does not want to copy files deeper than 1 level (even though Recursive is set).
Unzip the attachment to your Temp directory and run CopyTest.bld. |
#12
|
|||
|
|||
There was a problem with inadvertent creation of non-matching folders when using the 'Copy empty subdirectories' option, which is fixed in the latest beta build.
As far as your includes/excludes, B*/* means match all files within subfolders starting with a B (non-recursively). \bet L1\exclude means exclude all files named exclude within the folder bet L1. And it does seem to do that. Possibly, you want to match all files (recursively) within folders starting with B. Use B*/**/* for that. And to exclude all files within the subfolder bet L1\exclude (recursively), use bet L1\exclude\**\*. To exclude only files within the folder bet L1\exclude, use bet L1\exclude\*. |
#13
|
|||
|
|||
It works!!!
The latest beta fixes the problem with creating empty directories for non-matching folders. Thanks.
I've updated my Include pattern to now be \B*\**\*, which does exactly what I need it to do. I've also updated my Exclude pattern to use cases of both <folder>\**\* and <folder>\*, which works exactly as you have described. I would very much appreciate it, however, if you would add a few more "complex" pattern examples (like these) to your include/exclude help page. I know that there are several there already, but a few extra wouldn't hurt. Thanks for taking care of this so quickly and for the explanations. I've modified my test program to add a few more test cases, all of which seem to be working just fine. 6.2 is shaping up to be a very powerful release. |
|
|