zip files using C#

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Is it possible to read a directory and zip the files within that directory using C#?
What I'm trying to do is, create a process (windows service, console app, etc) that will read a directory that stores log files. I want to then take all the log files that are 6 months or older and zip them automatically.

So if the job ran today, It would look for files that are 6 months old and older from today and zip them and then move that zip file into an archive folder. I would like this to run on a weekly basis which I would schedule via windows task scheduler. Is this something that can be done using C#?
 
Back
Top