[clamav-win32] How to handle wildcards with clamdscan?
David E. Smith
dave at mvn.net
Fri Feb 15 19:14:43 CET 2008
Bret Miller wrote:
> If Declude can call a script (or cscript.exe), I'd tend to write a vbs
> script and call it with the complete command line. It can parse the
> parameters, remove the *.* from the end and pass just the folder name to
> clamdscan, which should cause it to scan the folder, and then pass back the
> return code. I suppose it would be more efficient to write it in C or
> something, but there's really nothing complicated about stripping a bit off
> the last parameter. I've got plenty of code, but none that does exactly
In my testing, stripping the *.* doesn't work either - clamdscan just
says it can't find c:\temp\foo\ and still errors out. What's probably
needed, then, is something that can expand the wildcards and pass the
results on to clamdscan.
Everything else can be hard-coded into a wrapper, for my purposes. I can
have Declude call "wrapper.exe", it'll expand that to "wrapper.exe
c:\temp\*.*", the wrapper will in turn expand that to "clamdscan.exe
-option1 -option2 c:\temp\file.1 c:\temp\file.2" and I can grab the
return code, pass it back up the chain, and in theory everything should
work. It's a bit of a hack but I'll take it.
More information about the clamav-win32