![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 2336 Date : 2002-06-23 Author : Kan Yabumoto Subject : Re: /X exclude paramter confusion Size(KB) : 8
Dwayne: DCOPY32 v.2.40.0 is equivalent to XXCOPY.EXE v.2.40.0. /x"\Temporary Internet Files"\*\* --> syntax error /x"\Temporary Internet Files\*\*" /x"*\Temporary Internet Files"\*\* --> syntax error /x"*\Temporary Internet Files\*\*" The ending \*\* as an X-parameter means everything inside the directory (includes both files and subdirectories like what the /S switch does to the source specifier). Now, the distinction between the remaining two which does not have syntax error, /x"\Temporary Internet Files\*\*" /x"*\Temporary Internet Files\*\*" is the asterisk at the beginning. Since the first one with the leading backslash signifies the root directory (of the volume for the source directory), it is an absolute path specifier. It reads "everything in the "\Temporary Internet Files\" directory. The second one is a relative path specifier. The leading * is an effect similar to /S for the source specifier. It includes all subdirectories of the source base directory whose directory name is "Temporary Internet Files". Unfortunately, the example Dwayne supplied has %1 and %2 which were not supplied. So I can't comment on the example. I might add that depending on the operating system, the /X\mydir\ specifier may or may not work correctly. (This is especially true when a UNC path is supplied). This was due to the fact XXCOPY (and DCOPY32) calls the GetFullPathName() system function. Later we found out that this pivotal function had very irregular behaviors on NT4 and 2K (and XP) which are not consistent and we had to write our own "preprocessor" function to eliminate irregularities. It took several iterations to finally make XXCOPY to work well --- the problem was quite subtle and appeared only on certain special cases ---- the root level specifiers had more troubles. It was not until XXCOPY v.2.70.8 (2001-09-28) where the current (and bug-free) treatments of the path specifier especially for the /X parameter started to work without known problems. (Or, more recently we discovered one minor situation which failed --- corrected in v.2.80.8 2002-05-11). So, to make my long story short, yes, there were "bugs" in v.2.40.0 with respect to the /X specifiers especially with "root" level references. The latest betatest release has no known bugs on this matter. http://www.xxcopy.com/betatest/ Kan Yabumoto =========================================================== P.S. For anyone interested in my "lab-note" with regard to this problem, the following is "cut-and-pasted" text of my exhaustive experiments on this issue. The whole thing is so cryptic even to the author, much of the text no longer makes sense at first glance. But, you may get some feel for the extent of hassle the developer has to go through to make a program work on various platforms. /* -------------------------------------------------------------------- 2001-09-01 2704d bugfix This function was created to patch the discrepancies between W9x and NT/2K for the GetFullPathName() function which behaves differently when \\server\resource is specified (NT/2K sets NULL for pLastName). In the NT/2000 environment, when dstbuf points to the root item of a remote resource (e.g., \\serv\c\), pMyLast will be NULL. Therefore, we need to do it differently here. GetFullPathName() Universal (9N2) Input string Ret (ptr) ptr at . . 13 (7) C:\dev\xxcopy xxcopy \ E 9 3 (3) C:\ end c:\. E 9 3 (3) c:\ end c:\.. E 9 3 (3) c:\ end c:\..\. E 9 3 (3) c:\ end c:\..\.. E 9 3 (3) c:\ end c:\\ c:\dev . 6 (3) c:\dev dev c:\dev\ E 9 7 (7) c:\dev\ end c:\dev\. . 6 (3) c:\dev dev c:\dev\.. E 9 3 (3) c:\ end c:\dev\xxcopy . 13 (7) c:\dev\xxcopy xxcopy c:\dev\xxcopy\ E 9 14 (14) c:\dev\xxcopy\ end \\ EN 9N 0 (0) end \\serv E 9 0 (0) end \\serv\ E 9 0 (0) end \\serv\c . 8 (7) \\serv\c c \\serv\c\ E 9 9 (9) \\serv\c\ end \\serv\c\. a 9 8 (7) \\serv\c c \\serv\c\.. a 9 8 (7) \\serv\c c \\serv\c\bin . 12 (9) \\serv\c\bin bin \\serv\c\bin\ E 9 13 (13) \\serv\c\bin\ end \\serv\c\bin\. . 12 (9) \\serv\c\bin bin \\serv\c\bin\.. E 9 9 (9) \\serv\c\ end Win98SE Input string Ret (ptr) ptr at . OK 13 (7) C:\dev\xxcopy xxcopy \ OK 3 (NULL) C:\ ---- c:\. 3 (NULL) c:\ ---- c:\.. 3 (NULL) c:\ ---- c:\..\. 3 (NULL) c:\ ---- c:\..\.. 3 (NULL) c:\ ---- c:\\ OK 4 (NULL) c;\\ ---- c:\dev 6 (3) c:\dev dev c:\dev\ 7 (NULL) c:\dev\ ---- c:\dev\. 6 (3) c:\dev dev c:\dev\.. 3 (NULL) c:\ ---- c:\dev\xxcopy 13 (7) c:\dev\xxcopy xxcopy c:\dev\xxcopy\ 14 (NULL) c:\dev\xxcopy\ ---- \\ * 0 (NULL) ---- \\serv * 0 (NULL) ---- \\serv\ * 0 (NULL) ---- \\serv\c * 8 (7) \\serv\c c \\serv\c\ OK 9 (NULL) \\serv\c\ ---- \\serv\c\. * 9 (NULL) \\serv\c\ ---- \\serv\c\.. ? 9 (NULL) \\serv\c\ ---- \\serv\c\bin OK 12 (9) \\serv\c\bin bin \\serv\c\bin\ OK 13 (NULL) \\serv\c\bin\ ---- \\serv\c\bin\. OK 12 (9) \\serv\c\bin bin \\serv\c\bin\.. ? 9 (NULL) \\serv\c\ ---- \\serv\c\bin\abc OK 16 (13) \\serv\c\bin\abc abc \\serv\c\bin\abc\ OK 17 (NULL) \\serv\c\bin\abc\ ---- \\serv\c\bin\abc\. OK 16 (13) \\serv\c\bin\abc abc \\serv\c\bin\abc\.. OK 9 (NULL) \\serv\c\bin bin WinNT4 Input string Ret (ptr) ptr at . OK 13 (7) C:\dev\xxcopy xxcopy \ OK 3 (NULL) C:\ ---- c:\. 3 (NULL) c:\ ---- c:\.. 3 (NULL) c:\ ---- c:\..\. 3 (NULL) c:\ ---- c:\..\.. 3 (NULL) c:\ ---- c:\\ ? 3 (NULL) c;\ ---- c:\dev 6 (3) c:\dev dev c:\dev\ 7 (NULL) c:\dev\ ---- c:\dev\. 6 (3) c:\dev dev c:\dev\.. 3 (NULL) c:\ ---- c:\dev\xxcopy 13 (7) c:\dev\xxcopy xxcopy c:\dev\xxcopy\ 14 (NULL) c:\dev\xxcopy\ ---- \\ * 2 (NULL) \\ ---- \\serv * 6 (2) \\serv serv \\serv\ * 7 (NULL) \\ervrv\ ---- \\serv\c * 8 (7) \\serv\c c \\serv\c\ OK 9 (NULL) \\serv\c\ ---- \\serv\c\. * 8 (7) \\serv\c c \\serv\c\.. ? 8 (7) \\serv\c c \\serv\c\bin OK 12 (9) \\serv\c\bin bin \\serv\c\bin\ OK 13 (NULL) \\serv\c\bin\ ---- \\serv\c\bin\. OK 12 (9) \\serv\c\bin bin \\serv\c\bin\.. ? 8 (7) \\serv\c c \\serv\c\bin\abc OK 16 (13) \\serv\c\bin\abc abc \\serv\c\bin\abc\ OK 17 (NULL) \\serv\c\bin\abc\ ---- \\serv\c\bin\abc\. OK 16 (13) \\serv\c\bin\abc abc \\serv\c\bin\abc\.. OK 12 (9) \\serv\c\bin bin Win2KP Input string Ret (ptr) ptr at . OK 13 (7) C:\dev\xxcopy xxcopy \ OK 3 (NULL) C:\ ---- c:\. OK 3 (NULL) c:\ ---- c:\.. OK 3 (NULL) c:\ ---- c:\..\. OK 3 (NULL) c:\ ---- c:\..\.. OK 3 (NULL) c:\ ---- c:\\ ? 3 (NULL) c;\ ---- c:\dev 6 (3) c:\dev dev c:\dev\ 7 (NULL) c:\dev\ ---- c:\dev\. 6 (3) c:\dev dev c:\dev\.. 3 (NULL) c:\ ---- c:\dev\xxcopy 13 (7) c:\dev\xxcopy xxcopy c:\dev\xxcopy\ 14 (NULL) c:\dev\xxcopy\ ---- \\ ? 2 (NULL) \\ ---- \\serv ? 6 (NULL) \\serv ---- \\serv\ ? 7 (NULL) \\serv ---- \\serv\c >>> ? 8 (NULL) \\serv\c ---- \\serv\c\ OK 9 (NULL) \\serv\c\ ---- \\serv\c\. ? 8 (NULL) \\serv\c ---- \\serv\c\.. ? 8 (NULL) \\serv\c ---- \\serv\c\bin OK 12 (9) \\serv\c\bin bin \\serv\c\bin\ OK 13 (NULL) \\serv\c\bin\ ---- \\serv\c\bin\. OK 12 (9) \\serv\c\bin bin \\serv\c\bin\.. ? 8 (NULL) \\serv\c ---- \\serv\c\bin\abc OK 16 (13) \\serv\c\bin\abc abc \\serv\c\bin\abc\ OK 17 (NULL) \\serv\c\bin\abc\ ---- \\serv\c\bin\abc\. OK 16 (13) \\serv\c\bin\abc abc \\serv\c\bin\abc\.. OK 9 (NULL) \\serv\c\bin bin KGetFullPath GetFullPathName() ----------------------------- (1) 98se NT4 2000 XP ------------------------------------------------------------------------- \ =-> C:\ 3(3) 3(NULL) 3(NULL) 3(NULL) " \\ 0(0) 0(NULL) 2(NULL) 2(NULL) " \\serv 0(0) 0(NULL) 6(2) 6(NULL) " \\serv\ 0(0) 0(NULL) 7(NULL) 7(NULL) " \\serv\c 8(7) 8(7) 8(7) 8(NULL) " ^ \\serv\c\ 9(9) 9(NULL) 9(NULL) 9(NULL) " \\serv\c\. 8(7) 9(NULL) 8(7) 8(NULL) " \\serv\c\ \\serv\c \\serv\c \\serv\c\.. 8(7) 9(NULL) 8(7) 8(NULL) " \\serv\c\ \\serv\c \\serv\c \\serv\c\bin 12(9) 12(9) 12(9) 12(9) " ^ \\serv\c\bin\ 13(13) 13(NULL) 13(NULL) 13(NULL) " \\serv\c\bin\. 12(9) 12(9) 12(9) 12(9) " \\serv\c\bin \\serv\c\bin \\serv\c\bin \\serv\c\bin\.. 8(7) 9(NULL) 8(7) 8(NULL) " \\serv\c\ \\serv\c \\serv\c \\serv\c\bin\abc\.. 12(9) 12(9) 12(9) 12(9) " \\serv\c\bin \\serv\c\bin \\serv\c\bin Remedy by KGetFullPathName() KGG 1. in Win9x, when return value is 0, replace it with strlen(path) 2. in Win9x, fix the case \\serv\c\. --> \\serv\c -------------------------------------------------------------------- */ At 2002-06-22 23:29, Dwayne wrote: >Good day to all > >I am struggling with a backup batch file where I want to exclude temporary >internet files. > >One problem is that I don't know where to put the double quotes that >surround a file or directory spec that contains spaces embedded within the >name. Should the double quote include the '\*\*' or not? > >I have tried various combinations of the following: > >/x"\Temporary Internet Files"\*\* >/x"\Temporary Internet Files\*\*" >/x"*\Temporary Internet Files"\*\* >/x"*\Temporary Internet Files\*\*" > >An example of the full command follows: > >.\bin\dcopy32 %1 %2 /bu/x*.swp/x*.par/x"*\Temporary Internet Files\*\*" >/onerror.log%3
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.