home *** CD-ROM | disk | FTP | other *** search
/ SDN¹ Plus / SDN1_.cdr / sdn / util1 / dx_209.sdn / DX.CED < prev    next >
Text File  |  1989-02-01  |  8KB  |  172 lines

  1. rem
  2. rem    DX.CED   CED Synonyms for DX v2.09   Robert K. Blaine/ECONO-SOFT 12/88.
  3. rem
  4. rem    This file is intended as a working sample of a set of CED synonyms
  5. rem    to make using DX easier. You may use them as is or take them as
  6. rem    examples in developing or augmenting your own.
  7. rem
  8. rem    PCED is a trademark of and available from:
  9. rem      The Cove Software Group
  10. rem      P.O Box 1072
  11. rem      Columbia, Maryland  21044
  12. rem
  13. rem    This synonym file will run without modification assuming that DX.EXE
  14. rem    is located in a directory on your PATH. To make the synonyms run faster,
  15. rem    it is advantageous to replace all occurances of "dx" in this file with
  16. rem    a call that specifies the entire path -- the best performance will be
  17. rem    achieved by copying DX to a RAM disk as part of your AUTOEXEC.BAT and
  18. rem    then replacing all occurances of "dx" in this file with "x:dx" where
  19. rem    "x:" is the name of the RAM disk. 
  20. rem
  21. rem    Many people like to use a master synonym to call DX. This can be
  22. rem    a convenient method of setting DX's parameters as an alternate to
  23. rem    setting an environment variable. Be aware, however, that using a
  24. rem    master synonym has the drawback of reducing the amount of command
  25. rem    line available for individual options when calling DX. The total
  26. rem    length of the line after PCED has parsed all the synonyms is 127
  27. rem    characters.
  28. rem
  29. rem    This synonym file may be loaded into PCED with the following command:
  30. rem      ced -b1024,128,3000,128,128,128 load dx.ced
  31. rem
  32. rem    Try to avoid the use of positional parameters (%1, %2, etc.) as they 
  33. rem    make the use of multiple patterns difficult (pattern1+pattern2;pattern3). 
  34. rem    If you don't use any positional parameters, PCED will tack all the 
  35. rem    parameters on to the end of the synonym. If you must use positional 
  36. rem    parameters, using all 9 (as shown in the "comp" example) allows the most
  37. rem    flexibility in adding additional parameters.
  38.  
  39. rem ================ Clear Previous Synonyms ==================================
  40.  
  41. clear  syn
  42.  
  43. rem ================ Quick and Easy Directories ===============================
  44.  
  45. syn    d       "dx"
  46. syn    da      "dx a:"
  47. syn    db      "dx b:"
  48. syn    dc      "dx c:"
  49. syn    dd      "dx d:"
  50.  
  51. rem    Ex:  d                 ;view default directory
  52. rem         db                ;view directory of B:
  53.  
  54. rem ================ Quick and Easy Wide-Format Directories ===================
  55.  
  56. syn    dw      "dx /w"
  57. syn    daw     "dx /w a:"
  58. syn    dbw     "dx /w b:"
  59. syn    dcw     "dx /w c:"
  60. syn    ddw     "dx /w d:"
  61. syn    arcw    "dx %1\/w"
  62.  
  63. rem    Ex:  dw                 ;view default directory in wide format
  64. rem         dd                 ;view directory of D: in wide format
  65. rem         arcw myarc         ;wide directory of archive or library "myarc"
  66.  
  67. rem ================ Selecting Files ==========================================
  68.  
  69. syn    new     "dx /at:!a"
  70. syn    tod*ay  "dx /since"
  71. syn    yes*ter "dx /since:yesterday"
  72. syn    sd      "dx /at:!d"
  73. syn    ld      "dx /ld"
  74. syn    ldw     "dx /ld/w"
  75.  
  76. rem    Ex:  new               ;view all files newly created or modified
  77. rem         tod               ;view all files created or modified today
  78. rem         sd                ;show all directories in current directory
  79. rem         ld                ;show sizes of all files in each directory in
  80. rem                           ;the tree from the current directory on down
  81. rem         ldw               ;wide-format of the directory tree
  82.  
  83. rem ================ Deleting Files ===========================================
  84.  
  85. syn    vdel    "dx /del/v/ro:n"
  86. syn    dbak    "dx %1*.bak /del /v- %2 %3 %4 %5 %6 %7 %8 %9"
  87. syn    dro     "dx /del/v/ro:i"
  88. syn    gobak   "dx /gobak /v-"
  89. syn    cleanup "dx /ff/del/p-/v- \%1.bak+.tmp+.hld+*temp*"
  90. syn    zdel    "dx /size:0 /del /v-"
  91. syn    delsys  "if not '%1' == '' dx %1\ibm*.com+command.com/ro:i/del/f"
  92.  
  93. rem    Ex:  vdel \path        ;verified delete of normal files in "\path";
  94. rem                           ;read-only files never touched
  95. rem         dbak c:           ;delete all "C:*.BAK" files without verify
  96. rem         dro               ;verified delete of all files ignoring the
  97. rem                           ;read-only attribute
  98. rem         gobak prog.pas    ;if "PROG.BAK" exists, delete "PROG.PAS"
  99. rem                           ;and rename "PROG.BAK" to "PROG.PAS"
  100. rem         cleanup           ;sweep the default drive and delete all ".BAK",
  101. rem                           ;".TMP",".HLD", and "*TEMP*" files without asking
  102. rem         zdel              ;delete all zero-length files in this directory
  103. rem         zdel \ /ff        ;sweep the entire disk deleting zero-length files
  104. rem         delsys a:         ;remove DOS system files from A:
  105.  
  106. rem ================ Copying, moving, and comparing files =====================
  107.  
  108. syn    comp    "dx /v-/p- %1 /comp:%2 %3 %4 %5 %6 %7 %8 %9"
  109. syn    co*pyc  "dx /v-/p- %1 /copy:%2 %3 %4 %5 %6 %7 %8 %9"
  110. syn    vco*pyc "dx /v /p- %1 /copy:%2 %3 %4 %5 %6 %7 %8 %9"
  111. syn    mo*ve   "dx /v-/p- %1 /move:%2 %3 %4 %5 %6 %7 %8 %9"
  112. syn    vmo*ve  "dx /v /p- %1 /move:%2 %3 %4 %5 %6 %7 %8 %9"
  113.  
  114. rem    Ex:  comp *.pas c:     ;compare all "*.pas" to files on C:
  115. rem         copy *t e:\save\  ;copy all files ending in "t" to "E:\SAVE"
  116. rem                           ;creating the directory if needed
  117. rem         vmov .hld \hold   ;verified move of all "*.HLD" to "\HOLD"
  118.  
  119. rem ================ File Attribute and Date Manipulation =====================
  120.  
  121. syn    fa      "dx /v- %1 /fa:%2 %3 %4 %5 %6 %7 %8 %9"
  122. syn    ro      "dx /fa:r /v-"
  123. syn    rw      "dx /fa:r-/v-"
  124. syn    ro-all  "dx /at:r- /ff /fa:r /v- /p- \%1.com+.exe+.bat+.dev+.sys"
  125. syn    fd      "dx /v- %1 /fd:%2 %3 %4 %5 %6 %7 %8 %9"
  126. syn    touch   "dx /fdate:now"
  127.  
  128. rem    Ex:  fa newfile a-     ;turn off the archive bit on "newfile"
  129. rem         ro file.ext       ;make "file.ext" read-only
  130. rem         rw .bas           ;make all "*.bas" read-write
  131. rem         ro-all b:         ;sweep the B: drive making all appropriate
  132. rem                           ;files read-only
  133. rem         fd xx 3-sep:6p    ;set xx's date/time to September 3 at 6:00pm
  134. rem         touch .pas        ;set the date/time on all "*.PAS" files in this
  135. rem                           ;directory to the current date/time
  136.  
  137. rem ========================== Utility Options ================================
  138.  
  139. rem  Call Chris Dunford's file differencer, HDIFF, to compare a file with it's
  140. rem  backup version:
  141. syn    diffbak "dx /run:'hdiff -cs $d$p\$f.bak $s'"
  142.  
  143. rem    Ex:  diffbak prog.pas  ;compare prog.bak with prog.pas
  144.  
  145. rem  To print a complete disk directory in "tiny" print on an Epson printer:
  146. syn    fulldir "dx \%1 /f /ff:a /so:*nec /he:2 /st:4 /pr /prm:tiny /prmarg:10"
  147.  
  148. rem  Display free space on a disk, type "free x:"
  149. syn    free    "dx /st:4 /to"
  150.  
  151. rem  To simply create a list of files, type "lf files"
  152. syn    lf*iles "echo $n | dx /b /ex- /o"
  153.  
  154. rem  Test if a set of files exist in another drive/directory and delete them
  155. rem  from this directory if so:
  156.  
  157. syn    tdel    "echo if exist %2$n dx $n/del | dx/b %1"
  158.  
  159. rem    Ex:  tdel .pas b:      ;delete *.pas if present on B: -- verified
  160.  
  161. rem  Verified interface to PRINT.COM (PRINT.COM must have been previously
  162. rem  loaded or the system will hang):
  163.  
  164. syn    vprint  "dx /run:'print $n'"
  165.  
  166. rem    Ex:  vprint *.doc      ;verified print of "*.DOC"
  167.  
  168. syn    ff      "dx /ff \"
  169. syn    ffa     "dx /ff:a \"
  170. syn    fs      "dx %1/fs:%2 %3 %4 %5 %6 %7 %8 %9"
  171. syn    view    "dx /view /v-"
  172.