#67 7zipExample Automation Application In C#
While creating a download page for a website I came across the problem where the browser would open a
window.location.href = "url/path/file.pdf"; function. A quick easy solution is to archive the
.ZIP file or
.7z etc. Now when the function is called the file will be downloaded.
Using a quick C# WinForms application I was able to automate the process. Here I have included a small demo project which may be useful on windows machines.
The Main function is as below:
A new process is started and Arguments are sent to the
7za.exe console application.
7za.exe can also be used in the CMD console as well as with scripting languages such as PowerShell or Batch.