home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / dirx.zip / DIRXDEMO.BAT < prev    next >
DOS Batch File  |  1992-09-17  |  3KB  |  92 lines

  1. @echo off
  2. if %1a == a goto :HELP
  3. cls
  4. echo            Welcome to the show! prepare to be amazed!
  5. echo              The first contest will be DIRX vs DIR
  6. echo (watch this)
  7. pause
  8. echo on
  9. dir %1:\
  10. @echo off
  11. echo Want to see a list of DIR files only? easy! (dir %1:\*.)
  12. pause
  13. echo on
  14. dir %1:\*.
  15. @echo off
  16. echo .
  17. echo .
  18. echo Now how about everything but the DIR files?  DOS doesn't know how to do that!
  19. echo But DIRX does! (dirx {%1:\ -D)
  20. pause
  21. echo on
  22. dirx {%1:\ -D
  23. @echo off
  24. echo .
  25. echo .
  26. echo Note that dirx gives the same display, but includes another column - these are
  27. echo the file attributes.  A(rchive) R(ead-only) H(idden) S(ystem) D(irectory)
  28. pause
  29. echo How about all non DIR files, except the system files? (dirx {%1:\ -d -s)
  30. pause
  31. echo on
  32. dirx {%1:\ -d -s
  33. @echo off
  34. echo .
  35. echo .
  36. echo Now let's take away command.com, autoexec.bat, and config.sys from the list.
  37. echo (dirx -d -s -command.com -autoexec.bat -config.sys {%1:\)
  38. pause
  39. echo on
  40. dirx -d -s -command.com -autoexec.bat -config.sys {%1:\
  41. @echo off
  42. echo .
  43. echo .
  44. echo How about all of the system files that begin with "IO" (dirx {%1:\ +s io*.*)
  45. pause
  46. echo on
  47. dirx {%1:\ +s io*.*
  48. @echo off
  49. echo .
  50. echo .
  51. echo How about all of the executable, command, and batch files?
  52. echo (dirx *.exe {%1:\ *.com *.bat)
  53. pause
  54. echo on
  55. dirx *.exe {%1:\ *.com *.bat
  56. @echo off
  57. echo .
  58. echo .
  59. pause
  60. echo I won't demonstrate this one, but DELX uses exactly the same conventions as the
  61. echo above examples to delete selected files.  This means that after you use DIRX
  62. echo to see what files are in the list you specified, you could type "DEL" and then
  63. echo press F3 to copy the rest of the previous command line onto the cursor line.
  64. echo That process will delete ALL of the files and/or directories specified.  Note
  65. echo that Hidden (+H) and Read-only (+R) files and Directories (+D) will be deleted
  66. echo automatically if the attributes are specified as included (+).  If you don't
  67. echo specify the attribute, you will be prompted before these types of files are
  68. echo deleted.  When directories are deleted, all sub-directories contained in them
  69. echo are deleted and removed, then the directory itself is removed.
  70. pause
  71. cls
  72. echo COPX also uses the same parameters, but also allows target parameters (up to 30)
  73. echo Each one must be preceded by a "}".  Multiple sources may be indicated (for DIRX
  74. echo DELX and COPX) by preceding them with a "{".  COPX allows you to copy a list of
  75. echo files to one or more disks on each target.  For example, if you specify }A: in
  76. echo the parameter list and drive A: does not have enough free diskspace to hold all
  77. echo of the files, COPX will pause and ask you if you want to continue on another
  78. echo disk, and on which drive.
  79. pause
  80. echo The /p and /w parameters affect DIRX the same way as they do DIR.
  81. echo Using /p with DELX causes it to pause before deleting each file.  When the file
  82. echo name is displayed on the screen the user can either press any key to delete it
  83. echo or CTRL-C to stop the program.
  84. echo The /n switch applies to COPX only and refers to "No prompting".  This means
  85. echo that the user will not be asked before a new directory is created.
  86. goto :END
  87. :HELP
  88. @echo off
  89. echo USE:   dirxdemo c
  90. echo where c is the letter of your boot disk
  91. :END
  92.