C'mon Les, that would be too easy,how about this :
code:
break on
$fso = createobject("Scripting.FileSystemObject")
$outputfile = @curdir + "\outputfile.txt"
$maxsize = 2048
? "which directory would you like to search? :"
gets $rootdir
$string = "Files in $rootdir (and subdirectories)"
shell '%comspec% /c echo $string > $outputfile'
$rc = recursivedir ("$rootdir")
? "finished, press any key to quit"
get $k
exit
Function recursivedir($path)
$folderpath = $fso.getfolder($path)
$fol = $folderpath.subfolders
for each $foldername in $fol
listfiles($foldername)
$recursivedir = $foldername
recursivedir($foldername)
next
endfunction
function listfiles($dir)
for each $file in $dir.files
$size = $file.size / 1024
if $size > $maxsize
$writepath = $dir.path
$writefile = $file.name
$string = "$size(kb) $writepath\$writefile"
shell '%comspec% /c echo "$string" >> $outputfile'
endif
next
endfunction
This also allows you to perform any kind of action you would like with them files.
A little more scripting could lead to your own search functions in kix, automatically scanning the network for MP3's and other *interesting* material and copy it to a central place
so anyone can enjoy !!!
ps, after struglling a while with the syntax (looping the loop...) i found it on planetsourcecode.com .. it was "written" by Subodh Dash. I was struggling with amuch cleaner loop but apparently that was not necessary. This script might dump some returncodes on your screen, i did not have the time to look into those but hey, they look quite interesting.....
Ciao,
MvdW