stuck to sort file's size, type, c/m/atime - 02/10/07 05:31 PM
My current working PC contains hundred of words, excels and powerpoint files so i would like to play around with it...
To create a small database for doc, xls and ppt
i would like to search any file size greater than 30KB
Now i would like to sort with ctime, mtime and atime and file types but how... i stuck here...
The @ctime is numeric sorted but then how to sort the files in the hash table and present in @window? I stuck there...
To create a small database for doc, xls and ppt
Code:
create { hmake file 10000 | noop $findfile(c:\,*.doc,0,hadd file $calc($hget(file,0).item + 1) $1-) noop $findfile(c:\,*.xls,0,hadd file $calc($hget(file,0).item + 1) $1-) noop $findfile(c:\,*.ppt,0,hadd file $calc($hget(file,0).item + 1) $1-) echo -a Total amount of files added: $hget(file,0).item }
i would like to search any file size greater than 30KB
Code:
searchsize { .window -l @size | var %d 1 | while (%d <= $hget(file,0).item) { if ($file($hget(file,%d)) >= 30720) { .aline @size $hget(file,%d) } inc %d } }
Now i would like to sort with ctime, mtime and atime and file types but how... i stuck here...
Code:
sortctime { .window -les @ctime | var %q 1 while (%q <= $hget(file,0).item) { aline @ctime $file($hget(file,%q)).ctime | inc %q } .... .......... }
The @ctime is numeric sorted but then how to sort the files in the hash table and present in @window? I stuck there...