I am using below code to make epub file but when i velidate epub this is showing error please help

set FILETOZIP=D:\e7477\feb\temp\utf.*

set TEMPDIR=D:\e7477\tool\zip\temp738
rmdir %TEMPDIR%
mkdir %TEMPDIR%
xcopy /s/y %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%  D:\e7477\feb\temp\utf\mimetype.epub
if exist D:\e7477\tool\zip\temp738 rd /s /q D:\e7477\tool\zip\temp738

  • You'll need to add the mimetype file to the zip file first but leave it uncompressed. Then add the rest of the files normally. I'd post an answer, but I don't know how to do it in VBScript. – thinkulum Mar 2 '16 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.