Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
5 years ago
Solved

Convert mht file to zip

How can I convert a mht file into zip ?

 

  • Hi kaiii,

    I have a test which compress and send by mail a mht file.

    Here are the few lines I use (delphi script) :

     

      Log.SaveResultsAs(ReportFolder + 'Report.mht', 2);
      FileList:= slPacker.GetFileListFromFolder(ReportFolder);
      ArchivePath:= ReportFolder + 'ZippedReport';
      if (slPacker.Pack(FileList, ReportFolder, ArchivePath)) then
        Log.Message('File ziped');
      result:= ArchivePath;  

6 Replies

  • Wamboo's avatar
    Wamboo
    Community Hero

    Hello,

     

    Search for it on Your local machine disc -> use Packer or custom actions to obtain that file.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    An MHT file is not a compressed file like a ZIP file is.  You can't open it and examine the contents.

    What are you hoping to do by making such a conversion?  Perhaps there's abetter way to meet your needs.

    • kaiiii's avatar
      kaiiii
      Regular Contributor

      Hi tristaanogre  Wamboo 

      Thanks for reply... and apologies I have mention wrong subject to query.

      Actually I want to compress mht file in zip and want to send report by script.

       

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Thank you Community!

         

        kaiiii, could you explain why you need to zip it? You can send the .mht file as far as I understand. 

        Please take a look at this article.