![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 7162 Date : 2004-02-04 Author : John Zeman Subject : Re: Command File Dir Exclusions Size(KB) : 4
Kan I must admit that even though I've read Technical Bulletin #05 many times myself, that I've never been completely clear on the way the exclusions work. This message post of yours has helped me a lot though, and I believe it can be of great benefit to others as well, now and in the future. So I've taken the liberty of including the main body of your reply below this, in the latest version of the xxcopy.chm help file (a new page was added named "More about Exclusions"). It is my hope that my doing this will eliminate your ever having to go to the trouble of explaining exclusions like this again. The latest version of the help file is available in the Files section of this forum http://groups.yahoo.com/group/xxcopy/files/ John --- In xxcopy@yahoogroups.com, Kan Yabumoto wrote:> > > > /X:"\*\*\baddir\" > > Well, the \*\*\ sequence will be folded into the shortest > equivalent form \*\. > > Therefore, the following lines are equivalent. > > /X:\*\*\*\*\BADDIR\ > /X:\*\*\*\BADDIR\ > /X:\*\*\BADDIR\ > /X:\*\BADDIR\ > > (the shortest one in this case is preferred). > > Don't be confused this from the special endings > > /X:dir_name\ > /X:dir_name\* > /X:dir_name\?\* > /X:dir_name\*\* > > All these are explained in the XXTB #05 article but > let me show some of the essence. > > XXCOPY views a directory as made up of two types > of components. > > files > subdirectories > > We wanted XXCOPY to exclude either of these > types of components rather than just a directory > with everything in it. With the extremely tight > budget in the allowed characters, we came up with > the following notation to denote the two types. > > files in a directory /X:dir_name\* > subdirectories in a directory /X:dir_name\?\* > > If you combine the two types of components in > a directory, it become a "whole" (everything in it). > > So, /X:dir_name\* and > /X:dir_name\?\* > > combined, then you get, > > /X:dir_name\*\* (i.e., everything in it) > > which is also the same thing as > > /X:dir_name\ > > Here, the point I wanted to make is the following > two are distinct: > > /X:dir_name\* > /X:dir_name\*\* > > But, the following three are equivalent > > /X:*\dir_name\ > /X:*\*\dir_name\ > /X:*\*\*\dir_name\ > > But, these are different from > > /X:?\*\dir_name\ > > ------------------------------------------------- > Note the ?\ sequence everywhere except at the > ending that is shown earlier has the regular > meaning of one character-pathname followed by > zero-or-more levels of directory of anything > which is followed by the pattern, \dir_name\ > which is different from the four special way > ending of a directory pattern. > ------------------------------------------------ > > ----------- > > Let me further clarify a few cases of the > syntax rules that may be confusing > > > /X:\*\BADIR\ > /X:BADIR\ > > The difference between the two is that > the first one is a directory that matches > \BADIR\ at any level including the root level > (\*\ may collapse to nothing), whereas the > second one does not have wildcard to the > left and therefore it does not have the > specification for the "any-level-of" meaning. > > Similarly, /X:\BADIR\ simply denotes the > pattern (in this case without a wildcard) > at the root level. > > > Finally, what is the difference betwee the > following two? > > /X:\*\BADDIR\ > /X:*\BADDIR\ > > Even though the mechanism to arrive the > result is different, the second one is > equivalent to the first one. > > 1st: any \BADDIR\ at any level under root > 2nd: any \ABDDIR\ at any level under the > source base directory. > > Actually, the scope of the 2nd pattern is > smaller than the first one (parent directory > of the base directory and any level above > are not included). But, the XXCOPY operations > always affects objects which are at the base > directory level or lower levels (to the right), > the 2nd (narrower) set of directories covers > all the affected directories and therefore, > the two always become equivalent in practice. > > ---------- > > TIP: > > To know which exclusion patterns are taken > by XXCOPY, you should verify the result of > the "pre-processing" step inside XXCOPY by > adding the /oX switch. > > E.g., (compare the two) > > xxcopy \src\ /X:\*\BADDIR\ /oX/DEBUGX > xxcopy \src\ /X:\*\*\BADDIR\ /oX/DEBUGX > > (The /DEBUGX switch will show you the > list of exclusion items and terminate the > command after the command line processing > before the actual file copy actions take > place). > > Kan Yabumoto
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.