[Samba] Re: PDC Administrative scripting
Michael Lueck
mlueck at lueckdatasystems.com
Thu Jul 8 22:17:49 GMT 2004
Jim C. wrote:
> I am more interested in preventing files over a certain size.
Excelent idea! Barrowing from the piece of code I wrote to answer the first question, here is a custom script for you...
/* Sample code to search and destory! */
searchlist='.mp3 .wav .avi'
maxokfilesize=10000
do s=1 to searchlist~words()
rc=SysFileTree('/homes/*'searchlist~word(s), filelist., 'FS')
if filelist.0>0 then do f=1 to filelist.0
parse value filelist.f with . . THISsize . THISfilename
if THISsize>maxokfilesize then do
rc=SysFileDelete(THISfilename)
end
end
end
--
Michael Lueck
Lueck Data Systems
Remove the upper case letters NOSPAM to contact me directly.
More information about the samba
mailing list