![]() Write access is also required for the folder the. As this is often not the case for the root of drive C TEMPDIR may have to be changed. Write access is required to the parent of the folder stored in TEMPDIR. Here is an all batch file solution (a variation of my other answer) that will zip a file named c:\ue_english.txt and put it in C:\someArchive.zip: set FILETOZIP=c:\ue_english.txtĮcho Set objArgs = WScript.Arguments > _zipIt.vbsĮcho InputFolder = objArgs(0) > _zipIt.vbsĮcho CreateObject("Scripting.FileSystemObject").CreateTextFile(ZipFile, True).Write "PK" ^& Chr(5) ^& Chr(6) ^& String(18, vbNullChar) > _zipIt.vbsĮcho Set objShell = CreateObject("Shell.Application") > _zipIt.vbsĮcho Set source = objShell.NameSpace(InputFolder).Items > _zipIt.vbsĮcho objShell.NameSpace(ZipFile).CopyHere(source) > _zipIt.vbsĬScript _zipIt.vbs %TEMPDIR% C:\someArchive.zip
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |