Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Zip all files in a directory
Zip all files in a directory [message #43054] Sun, 27 April 2014 21:38 Go to previous message
forlano is currently offline  forlano
Messages: 1080
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

I would like to zip all files in a given directory and save the archived .zip. Unfortunately the reference case does not help me Embarassed . This is my experiment
	FileZip zip(TD.PATHDIRWWW+"compress.zip");
        String targetdir = TD.PATHDIRWWW;
	FindFile fff(AppendFileName(targetdir, "*.*"));
	while(fff) {
			if(fff.IsFile()) {
				zip.WriteFile(LoadFile(fff.GetName()), fff.GetName());
			}
			fff.Next();
	}
	zip.Finish();

But produces a zipped archive with empty files. Of course I am using the wrong zip method. Which the correct one?
Thanks,
Luigi
 
Read Message
Read Message
Read Message
Previous Topic: [BUG] GLDraw on multiple window on the same time doesn't work
Next Topic: Problem displaying using TURTLE
Goto Forum:
  


Current Time: Wed Feb 19 09:15:59 CET 2020

Total time taken to generate the page: 0.01095 seconds