CID:||+v1.9R~:080129                                                  ||+v1.9R~
[[ English ]]
**********************************************************************
*XDIG:utility apply command to all sub-directories
**********************************************************************

[Function]

    Use this tool to apply command(.exe or .cmd/.bat script file) to
    all sub-directory and/or file.
    For example,using this tool you can search word in all sub-directory
    by applying grep,
    Redirection function is also effective to gather stdout/stderr output.
    On DOS,lacking of stderr redirection function,it will be useful when||+v1.9R~
    execute tool which write err message to stderr.

[Usage]

     parameter enclosed by [ ] is optional.

XDIG [directory] [file-mask] [dir-mask] [/options]  //cmd-string

     -directory :directory on which command-string is executed.
                 It is not required when use cmd output redirection only.
     -file-mask :file selective wild card mask
                 default is *.*
                 this may be cancatinated to directory wit \.         ||~v1.3I~
     -dir-mask  :sub-directory selective wild card mask
                 default is *.*
     -cmd-string:specify command with its parms
                 All parm to XDIG must be specified before //,
                 all word following // is treated part of command.
                 ex. //grep search-word *.c
                 @ of first char on cmd string mean cmd file specification.
                 Cmd string is accepted from first line of the cmd file.
                 You cannot specify any parm after cmd file specification.
                 ex. //@cmdfile

                 Special parameter can be used for each directory/file name.||~v1.3R~
                 %f%:file name, %d%:pathname, %fp%:fullpath name, %fb%:basename.||~v1.8R~
                 (When /Pd %f% is replaced to dir-name)               ||~v1.5R~
                 ex. //lc %f%                                         ||~v1.3R~
         (note)  % is treated differrently in BAT file and in cmd line||~v1.3I~
                 input. In BAT file,specify like as %%f%%.            ||~v1.3I~
                 But under Windows95,use double % in cmd line also.   ||~v1.3I~
                                                                      ||~v1.3I~
     -options   :(case insensitive)
       /1file   :redirection of stdout(/12 mean redirection stdout to stderr)
       /2file   :redirection of stderr(/21 mean redirection stderr to stdout)
#ifdef UNX                                                            ||~v1.7I~
#else  //!UNX                                                         ||~v1.7I~
       /Aattr   :file/dir selective attribute mask
                 attr=S,H,D(default is SH).'+'/'-' can  be prefixed.  ||~v1.3R~
                 ex. /Asd,  /A-s
#endif //!UNX                                                         ||~v1.7I~
       /Llevel  :dig directory up to the depth(0 mean starting dir)
       /O[-]ord :cmd apply file sequence in a directory.
                 N:name,E:extention+name,D:date,S:size,0:as is.
                 (default is 'N')
                 - mean reverse order except for 0.
       /Papply  :potatoes type.(default is 'f')
                 f:File, d:Dir, b:Both, n:None(for use redirection)
       /Ysw,/Nsw:toggle type switch options.
                 sw are as following,default is in ( )                ||+v1.9R~
#ifdef UNX                                                            ||~v1.7I~
#else  //!UNX                                                         ||~v1.7I~
              c :get 'C'onfirm before each cmd call.(/Nc)
#endif //!UNX                                                         ||~v1.7I~
#ifdef UNX                                                            ||~v1.7I~
              d :apply to special file(pipe,socket,device).(/Nd)      ||~v1.7I~
#endif                                                                ||~v1.7I~
              e :call also when directory is 'E'mpty(/Ne)             ||+v1.9R~
              h :c'H'ange directory for each call(/Yh)
              n :set 'N'ull value when no parm data for %f%,%fp%(/Nn) ||~v1.3R~
                 The case is when /Pd is specified or /Ye and dir is empty.
#ifdef UNX                                                            ||~v1.7I~
              k :process symbolic link(/Yk)                           ||~v1.7I~
              m :Output symbolic link err msg (/Ym)                   ||~v1.7I~
#endif                                                                ||~v1.7I~
              t :'T'race executed command text and subdir(/Yt)
              x :execute command as e'X'e type(/Nx)
                 In the case invalid extention name is specified.
[ex.]

 -all sub-directory operation
  XDIG  dirabc /21 /Pd //grep "srch-word" %d%                         ||~v1.3R~

 -file operation using comd file.
  XDIG dirabc *.c  //@foo

 -redirection only
  XDIG /2wkf //getstder parm1
                                                                      ||~v1.3I~
[Change History]                                                      ||~v1.3I~
  v1.4 (98/11/03)                                                     ||~v1.3I~
       -Display filename on trace msg                                 ||~v1.3I~
       -(BUG) errornous process of /L parameter(stop depth of directory level)||~v1.3I~
  v1.5 (99/11/12)                                                     ||~v1.5I~
       -(BUG)%fp% is not replaced /when /Pd.                          ||~v1.5I~
  v1.6 (00/09/30)                                                     ||~v1.7I~
       -Linux support.                                                ||~v1.7I~
  v1.7 (03/02/10)                                                     ||~v1.7I~
       -(UNX)Symbolic link,special file  consideration.               ||~v1.7I~
  v1.8 (06/08/29)                                                     ||~v1.8I~
       -%fb%:basename specification support                           ||~v1.8I~
