[<<]Message[>>]    [<<]Author[>>]    [<<]Subject[>>]    [<<]Thread[>>]

Number : 7158 Date : 2004-02-04 Author : wjaiv Subject : Re: Command File Dir Exclusions Size(KB) : 4
--- In xxcopy@yahoogroups.com, Kan Yabumoto wrote: > Michael wrote: > > On stardate Tue, 03 Feb 2004 14:30:16 -0000, while visiting > > Deep Space 9, the changeling Founder wjaiv spake thusly: > > > >> What is the proper syntax for excluding directory, *wherever* they > >> may exist... be it at the root of a volume, in a subdirectory, or > >> even buried deep in a subdirectory? I've tried a few variations: > >> /X:\*\BADDIR\ > >> /X:BADDIR\ > >> /X:\BADDIR\ > >> > >> Which way is correct? Thanks! > > > > > > /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 Thanks for the information... I did not realize the #5 documentation file was there. I am working with your responses and that file to see if I can get what I need. I appreciate everyone's help.
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.