Ask a Question

Convert mht file to zip

SOLVED
kaiiii
Regular Contributor

Convert mht file to zip

How can I convert a mht file into zip ?

 

1 ACCEPTED SOLUTION

Accepted Solutions
m_essaid
Valued Contributor

Re: Convert mht file to 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;  

View solution in original post

6 REPLIES 6
Wamboo
Community Hero

Re: Convert mht file to zip

Hello,

 

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

tristaanogre
Community Hero

Re: Convert mht file to zip

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.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
kaiiii
Regular Contributor

Re: Convert mht file to zip

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
Community Manager

Re: Convert mht file to zip

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. 


Sonya Mihaljova
Community and Education Specialist

m_essaid
Valued Contributor

Re: Convert mht file to 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;  

View solution in original post

sonya_m
Community Manager

Re: Convert mht file to zip

Thank you m_essaid! This might be the anser kaiiii is looking for.

 

@kaiiii , does what m_essaid offer work for your case?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: