home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 083.lha / Walk.doc < prev    next >
Text File  |  1986-11-20  |  5KB  |  120 lines

  1. Walk V0.1 - Nov. 10, 1987
  2.  
  3.  
  4.    Walk is a CLI utility for performing a given CLI command on a group of
  5. files. The name arises because the utility "walks" down a given directory
  6. and all of it's subdirectories, performing the given command on each file
  7. that matches the optional pattern. The easiest way to explain what walk does
  8. is to show how it is used, and then discuss the finer points of each of it's
  9. arguments.
  10.  
  11. Invoking Walk
  12.  
  13.    Walk "d=Dir" "l=levels" "p=pattern" "+V" "c=Execute string"
  14.  
  15. where:
  16.  
  17.    Dir is an AmigaDOS type directory ( ram: df1: df0:c sys: fonts: etc. )
  18.  
  19.    The "d=" is mandatory, but quotes are only needed for directories
  20.    containing spaces. The "d" can be in upper or lower case.
  21.  
  22.    levels is an integer indicating how many subdirectories down to scan.
  23.    All directories up to this many levels down will be "walked".
  24.    "l=1" will do only the main directory level. The "l" can be either
  25.    upper or lower case. Quotes here are superfluous, but allowed.
  26.  
  27.    pattern is a standard AmigaDOS wildcard pattern. The "p" can be any
  28.    case. Only files matching the pattern will be affected by the command.
  29.  
  30.    The "+V" ( or "+v" ) command will cause each selected file's name to be
  31.    printed.
  32.  
  33.    The "c=Execute String" tells the program which CLI command to perform on
  34.    the selected files. Two special characters in this string give the
  35.    program most of it's utility. Wherever there is an '@', the currently
  36.    selected filename will be substituted. If your execute string were
  37.    "c=echo @", each of the selected files names would be printed on your
  38.    screen. Another special character is useful when copying and renaming.
  39.    It is the '#' symbol, which backs up one character during expansion.
  40.    This is only really useful immediately after an '@' symbol, for chopping
  41.    a few characters off the end of a filename during a command. For
  42.    instance:
  43.  
  44.       Walk +v p=#?.h "c=rename @ @##.c"
  45.  
  46.    would rename all files ending in ".h" to end with ".c". More than one
  47.    "c=command" string is allowed, in which case the commands are performed
  48.    in the order they are specified. For example:
  49.  
  50.       Walk +v p=#?.c "c=copy @ ram:" "c=delete @"
  51.  
  52.    would copy each file to ram:, then delete the original.
  53.  
  54.    The arguments can be given in any order, and the quotes are only needed
  55.    if the argument contains spaces.
  56.  
  57.    Now I got It & I Know How It Works But What The Hell Do I Do With It?
  58.  
  59.    Have you ever done this:
  60.  
  61.       list >file quick
  62.  
  63.    or this
  64.  
  65.       dir >file opt a
  66.  
  67.    and then edited the resulatnt file into an execute script? Well, this
  68.    program can make using the CLI a lot less drudgerous. You can delete
  69.    all the ".info" files or ".fastdir" files in every directory in one
  70.    fell swoop ( or one swell "foop"). You can rename old Musicraft scores
  71.    to ".smus" files with one command. You can print out all your header
  72.    files quick as you please, or copy them somewhere or whatever.
  73.  
  74.    With this command, the "protect" command is much easier to use, and
  75.    much more useful as well. The "setdate" command also takes on a
  76.    whole new importance. Multi file compiles are much easier on those
  77.    who have no "make" facility. The best way to learn what it can do for you
  78.    is to use it.
  79.  
  80.    WARNING
  81.  
  82.    This program can be very dangerous if used improperly. Power is power and
  83.    it must be handled with care. You might want to try giving no command
  84.    ( yes it's legal ) with verbose on to see which files will be operated
  85.    on. The program responds to <CTRL> 'C', but it will leave locks lying
  86.    around and keep some memory. You will also be left in whatever directory
  87.    was being scanned at the time.
  88.  
  89.    Defaults are 100 for number of levels, the current directory if not
  90.    specified, verbosity off and if no pattern is supplied, "#?" will
  91.    be used.
  92.  
  93.    If for some reason the command you have given is not found, the program
  94.    may hang up. It will also terminate if you alter the contents of the
  95.    directory it is currently in. This would happen if you gave a command
  96.    of "c=delete #?". Needless to say, this is a pretty dumb thing to use
  97.    this program for, but nevertheless it can happen.
  98.  
  99.    These and other bugs/inadequacies will be taken care of in a future
  100.    version, at which time I may also release the source code. The reason
  101.    I am releasing this now is that I thought many people would find it
  102.    useful. Please direct your comments to me via:
  103.  
  104.       Mail: Pete Patterson
  105.             95 Marshall Park Drive
  106.             North Bay, Ont. ( Canada )
  107.             P1A - 3L1      (705)-474-3363
  108.  
  109.       CompuServe: 72017,1251
  110.  
  111.    COMING SOON:
  112.  
  113.    A command to reassign EVERYTHING to a different disk without re-booting.
  114.    Actually, the prg. is finished, but I'm too lazy to write docs and
  115.    upload it. If you want it, let me know!
  116.  
  117.  
  118.  
  119.  
  120.