Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rating: Thread Rating: 10 votes, 5.00 average. Display Modes
  #1  
Old 07-11-2006, 07:59 AM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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?
Reply With Quote
  #2  
Old 07-11-2006, 02:00 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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
Reply With Quote
  #3  
Old 08-07-2006, 09:31 AM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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.
Reply With Quote
  #4  
Old 08-07-2006, 09:40 AM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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.
Reply With Quote
  #5  
Old 08-07-2006, 01:19 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
The exclusion issue has been fixed in the latest beta download.

Folder inclusion works ok in my tests (sample attached).
Attached Files
File Type: bld incl_folders.bld (990 Bytes, 1211 views)
Reply With Quote
  #6  
Old 08-15-2006, 10:59 AM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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?
Reply With Quote
  #7  
Old 08-15-2006, 12:16 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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.
Reply With Quote
  #8  
Old 08-15-2006, 02:02 PM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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.
Reply With Quote
  #9  
Old 08-15-2006, 04:36 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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.
Reply With Quote
  #10  
Old 08-15-2006, 08:48 PM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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.
Reply With Quote
  #11  
Old 08-16-2006, 10:07 AM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
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.
Attached Files
File Type: zip copytest.zip (102.7 KB, 1257 views)
Reply With Quote
  #12  
Old 08-16-2006, 02:01 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
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\*.
Reply With Quote
  #13  
Old 08-16-2006, 02:41 PM
Dave_Novak Dave_Novak is online now
Registered User
 
Join Date: 04-13-2006
Location: Atlanta, GA
Posts: 64
Smile 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.
Attached Files
File Type: zip copytest.zip (124.2 KB, 1473 views)
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 03:11 AM.


Copyright © 1999-2023 Kinook Software, Inc.