home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Der Mediaplex Sampler - Die 6 von Plex
/
6_v_plex.zip
/
6_v_plex
/
DISK5
/
DOS_34
/
AMAC44.ZIP
/
DSIZ@2.QM
< prev
next >
Wrap
Text File
|
1992-04-26
|
5KB
|
90 lines
* dsiz@2.QM
* Written By Tom Hogshead
* [ See DSIZxx.QM For Use ]
* 4/26/92
* M A C R O
* ----------------------------------------------------------------------
* @(2) Directory Sizes Sorted by Size in Descending Order,
* LEFT Justify Number of Files' Column
* ----------------------------------------------------------------------
* This macro lists all directories in a current or a specified drive,
* sorted by directory size in descending order. The number of files in
* each directory is also shown. The macro can be invoked only at the
* command line, not while editing, by running the batch file dsiz2.bat
* which must be in the path or current directory.
* SYNTAX: dsiz2 [drive:] <enter>
* After the directory list is saved as [drive:]\dsiz.lst and loaded for
* viewing, the temporary file c:\dsiz.ls (no "t" extension) is deleted.
* Macro @2 differs from @1 in that it LEFT justifies the number of
* files' column.
* Output of dsiz2.bat on my G: drive with @2 Note
* ------------------------------------------- LEFT Justification
* Volume [G:MINISCRB_2] created: 92-Jan-20 14:34:16; vvv
* Directory of [g:\qpro\] 2,214,991 bytes in 54 files
* Directory of [g:\nu\] 1,882,085 bytes in 45 files
* Directory of [g:\qe\] 1,400,421 bytes in 81 files
* Directory of [g:\pcplus\] 1,319,337 bytes in 158 files
* Directory of [g:\slmr\] 301,762 bytes in 15 files
* < Lines omitted >
* Directory of [g:\dos\] 166,684 bytes in 19 files
* Directory of [g:\pckwik\] 118,310 bytes in 13 files
* Directory of [g:\] 2,043 bytes in 1 file
* Directory of [g:\ibm\] 0 bytes in 1 file
* 14,310,447 bytes in 1,368 files. 15,069,184 bytes allocated (5% slack).
* Contents of dsiz2.bat using @2 in dsiz@2.qm are:
* ┌───────────────────────────────────────────────────────────────────────┐
* │: dsiz2.bat 4/23/92 │
* │: To run this batch file anywhere, change "Edsiz@2.mac" to: │
* │: "E[d:\path\]dsiz@2.mac" │
* │: where [d:\path\] is [drive:\directory\] for dsiz@2.mac location.│
* │: %1 = Drive with colon. Uses current drive if %1 is not specified. │
* │: Requires DX.EXE (Directory Extended) and Q.EXE in path. │
* │: Change c:\ to desired dsiz.ls location, preferably a ram drive. │
* │ │
* │ @echo off │
* │ cls │
* │ DX.EXE %1\ //t/st:1/he:1/at:hsd-/ff/ca:l/out:c:\dsiz.ls │
* │ Q.EXE c:\dsiz.ls /Edsiz@2.mac │
* └───────────────────────────────────────────────────────────────────────┘
@2 macrobegin setscreenoff savesettings setinsmode
setwordwrapmode togglewordwrap cursordown
* --------- Move Directory Size To Line With Directory Name ---------*
JOINLINE: cursordown cursordown jfalse AT_EOF
unmarkblock markcolumn endline markcolumn
cursorup delline
cursorup gotocolumn "50" return moveblock
endline delltword delltword delltword delltword
* ------------------- Delete Blank Lines After Move ------------------*
cursordown delline delline
AT_EOF: begline jtrue JOINLINE
* ----------------- Mark Size Block For Descend Sort -----------------*
begfile cursordown gotocolumn "50" return
unmarkblock markcolumn endfile cursorup markcolumn
* ------------- Descend Sort By Size (From @4 in rfr009.qm) ----------*
sort
AGAIN: gotoblockend jfalse DELMARK delline
gotoblockbeg unkill jump AGAIN
* ------------------ Save File To Drive And Cleanup ------------------*
DELMARK: begfile
wordright markword copy * Copy drive letter
writeblock
begline delch paste * Insert drive letter
endline "t" return * Write file to [d:]\dsiz.lst
"o" * In case [d:]\dsiz.lst exists
editfile return * Load [d:]\dsiz.lst
nextfile killfile quit * Kill/quit c:\dsiz.ls
restoresettings
*
* 116 bytes Fri 04-05-1991 17:01:02 (TH @2)
* 117 bytes Sun 09-15-1991 14:51:37 (TH @2, for all Qconfig's, v2.15 opt)
* 118 bytes Fri 10-11-1991 12:20:05 (TH @2, QEdit v2.15 required)
* 85 bytes Thu 04-23-1992 08:42:36 (TH @2, changed descend sort routine)