hi,
I am performing the following which works perfectly if there is not an empty
subdirectory within the folder I am trying to zip.
src = "c:\temp\"
dest = "c:\test\test1.zip"
'write zip file header
set fso = createobject("Scripting.FileSystemObject")
set file = fso.opentextfile(dest,forwriting,true)
file.write "PK" & chr(5) & chr(6) & string(18,chr(0))
file.close
set shl = createobject("Shell.Applicatioin")
shl.namespace(dest).copyhere shl.namespace(src).items
do until shl.namespace(dest).items.count = shl.namespace(src).items.count
wscript.sleep 100
loop
However, if there is an empty subdirectory I receive the following error
"The specified directory c:\temp\vbe is empty, so compressed (zipped) folders
cannot add it to the archive.
How do I prevent this from happening. If I do the same thing manually by
right clicking on temp and choosing send to\compressed folder I do not
receive the error.
thanks.