| Junior Member with 2 posts. THREAD STARTER | | Join Date: Nov 2011 Experience: Advanced | |
Well, all I have so far are snipets of code from browsing but because I don't have the knowledge to chop and change them, that's where I'm getting stuck.
Here is some code I've found for zipping (but it will only zip a specific file) Code: set FILETOZIP=c:\ue_english.txt set TEMPDIR=C:\temp738 rmdir %TEMPDIR% mkdir %TEMPDIR% copy %FILETOZIP% %TEMPDIR% echo Set objArgs = WScript.Arguments > _zipIt.vbs echo InputFolder = objArgs(0) >> _zipIt.vbs echo ZipFile = objArgs(1) >> _zipIt.vbs echo CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "PK" ^& Chr(5) ^& Chr(6) ^& String(18, vbNullChar) >> _zipIt.vbs echo Set objShell = CreateObject("Shell.Application") >> _zipIt.vbs echo Set source = objShell.NameSpace(InputFolder).Items >> _zipIt.vbs echo objShell.NameSpace(ZipFile).CopyHere(source) >> _zipIt.vbs echo wScript.Sleep 2000 >> _zipIt.vbs CScript _zipIt.vbs %TEMPDIR% C:\someArchive.zip pause I've got some vbs code to send an email using our internal smtp server and that's working nicely (I use it already for some other stuff).
Thanks, |