![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 2340 Date : 2002-06-23 Author : Kan Yabumoto Subject : Re: /X exclude paramter confusion Size(KB) : 5
Dwayne: Thank you for your message. As to the Steve Gibson reference, please give me the exact URL of the article. He has many products and lots of things he is involved. Although I have lots of respect to Mr. Gibson, I don't have time to go through all of what he says. I'm quite interested in knowing why he recommends NetBEUI rather than TCP/IP. Since the introduction of Win2000, Microsoft designated the TCP/IP protocol as the official network protocol for their platforms, I started to use TCP/IP exclusively. I don't bother installing any other protocols (extra, unused protocols presumably slow down the network operaton). However, I don't believe this has anything to do with XXCOPY/DCOPY operations. =========== >To summarize, the full command line might look like: > >.\bin\dcopy32 "u:\Documents and Settings" "t:\lwk\Documents and Settings" >/bu/x*.swp/x*.par/x"*\Temporary Internet Files\*\*" /onerror.log%3 > >where u: has been mapped to \\lwk\c The authoritative reference on the syntax of the /X switch is http://www.xxcopy.com/xxcopy05.htm. It spells out the effects of the leading asterisk (*\). That is, in your command, *ALL* subdirectories under the source base directory whose name is "Temporary Internet Files" are excluded. If your source volume has only one such directory, it is generally a good idea to spell out the path either as a relative path or as an absolute path. If I recall correctly, we had more bugs when you enter absolute path (but the latest version should work in either way). To spell out what is relative and what is absolute, I will give you exact syntax for this: relative path /X"Temporary Internet Files\" which is expanded to "U:\Documents and Settings\Temporary Internet Files\" absolute path /X"\Documents and Settings\Temporary Internet Files\" which is expanded as is (without change). If you leave it as you said, /X"Temporary Internet Files\" ,it will be matched to any of the following (or even more) directories "U:\Documents and Settings\Temporary Internet Files\" "U:\Documents and Settings\Foobar\Temporary Internet Files\" "U:\Documents and Settings\Foobar\xyz\Temporary Internet Files\" ... (as long as the directory path contains "Temporary Internet Files" in the path, it is matched and therefore excluded). Please study what is a "relative path spec" and an "absolute path spec" in the /X command specification. This distinction is perfectly consistent with the syntax rules of the Windows directory referencing. Note that the trailing "\*\*" is equivalent to just a trailing "\" and therefore used it in here. Lastly, I always remind XXCOPY users that it is always a good idea to add the trailing backslash in the source specifier to remove the syntactic ambiguity in the source specifier (XXCOPY inherited this from XCOPY). When you say xxcopy c:\mydir \dst\ The syntax is ambiguous. It can be interpreted in two ways. 1. Source base directory: C:\mydir\ filename template * 2. Source base directory: c:\ filename template mydir In the majority of the cases, the user want it to mean the first case. But, it could be the second case which is also valid on occasion. The ambiguity is resolved by XXCOPY (and XCOPY) by checking the source volume and if "mydir" exists as a directory in the root level, it will be treated as Case 1. Otherwise, it will be treated Case 2 (with a warning). This ambiguity (even if you are reasonably sure that the C:\mydir\ directory exists) is totally unnecessary. Just add the trailing backslash to eliminate this nonsense. If, for any reason, the directory is absent, it could be a major catastrophe and we take no responsibility for the loss of files. =-------- In conclusion, I don't see anything wrong but I would rewrite it to the following: .\bin\dcopy32 "u:\Documents and Settings\" "t:\lwk\Documents and Settings\" /bu/x*.swp/x*.par/x"\Documents and Settings\Temporary Internet Files\" /onerror.log%3 One more thing: Since this starts to get quite messy, I suggest that you use the /CF switch to make the command more readable. It is especially true when you want to eliminate unnecessary back up of directories. You will find a lot of directories and files that are not important in backing up. Therefore, having a well-documented /CF file, you may add many more exclusion items. *** ADVANCED feature ************ If you want to learn how to pass an environment variable to an XXCOPY command file, here is an example. If you need to parameterize some of the paths or driveletter, etc. from a common batch file, you may use environment variables in your batch file. E.g., mybatch.bat ------------------------------------------------------ set xxbackup_drive="U:" set xxbackup_src=%1 set xxbackup_dst=%2 set xxbackup_misc=%3 xxcopy /cfc:\mydir\myscript.xcf ------------------------------------------------------ myscript.xcf ------------------------------------------------------ "/%xxbackup_drive%\/%xxbackup_src%\" // src "T:\/%xxbackup_dst%\" // dst /X*.swp // exclude the swap file /X*.par // exclude /X"\Documents and Settings\Temporary Internet Files\" /Onerror.log // log file (newly created) /%xxbackup_misc% // whatever the mystery %3 was ------------------------------------------------------- Here, the /%xxxxx% part works just like the %xxxxx% element in a regular batch file (or just a command line) except for the leading prefix (slash). It will be substituted by the value for the environment variable (a null string if the env var does not exist). Kan Yabumoto
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.