U++ framework
Do not panic. Ask here before giving up.

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: 1237
Registered: March 2006
Location: Italy
Senior 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: Mon May 25 13:37:17 GMT+2 2026

Total time taken to generate the page: 0.00438 seconds