home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / m / msh_ut11.zip / PANEL.MSH < prev    next >
Text File  |  1992-05-10  |  1KB  |  34 lines

  1. |    file: PANEL.MSH      Improved panel_stats for Mi-Shell
  2. |───────────────────────────────────────────────────────────
  3. |
  4. (dup length 3 - str_pos!
  5. (str_pos 1 ge)(|  create two substrings and insert a "."
  6. dup | handle first copy
  7. 1 str_pos substring swap dup length str_pos 1 + swap substring
  8.  "," swap & &   | ',' American, english way
  9. | "." swap & &     | '.' German Way
  10. str_pos 3 - str_pos!)while
  11. )formatted_nr!
  12. ( "stats"                               | code enhanced by J.Pirnay
  13.   panel.nbfiles " files"&nl&
  14.   "total size "&
  15.   0 (current.size +)loop_panel formatted_nr &
  16.   " bytes " &
  17.   0 (current.selected(1 +)if)loop_panel | get nr of selected files
  18.   dup 0 >                               | any selected ?
  19.   (
  20.   0 (current.selected(current.size +)if)loop_panel formatted_nr
  21.   " bytes in " & swap &
  22.   " selected files" &
  23.   nl swap &&
  24.   )
  25.   (drop)                                | don't need nr anymore
  26.   ifelse
  27. || Now I want to know, what's still available at the drive:
  28.   nl &
  29.   prog_dir "dskfree " &  panel.pattern unit_and_name drop & " " &
  30.   prog_dir "df.txt" & & (execute)with_nomagic
  31.   prog_dir "df.txt" & read &
  32.   message
  33. )panel_stats!
  34.