Open a zip file and move the file in another zip in c++? - c++

I wanted to open a zip file (mod.zip) and move the file inside, to another zip file (minecraft.zip) and owerwrite the file with same names.I hope you understand because im not english.
I dont know if i can open zip files or i need libraries

I would recommend 7zip SDK, it lets you zip and unzip things in .7z and .zip and many other formats

Related

How to detect new file download in Windows OS?

I am making a program that scans any new file downloaded into the system.
Currently, I have used a file watcher that monitors a directory.
Whenever a file is downloaded from chrome then the following happens :
For example: Let's say a pdf file is being downloaded.
.tmp file created first
.tmp file is renamed to .crdownload
.crdownload is modified multiple times
.crdownload file is renamed to .pdf
.pdf file is modified multiple times.
The problem is when can I say a file is downloaded because it is modified multiple times after renaming from .crdownload to .pdf file.
Is there any way to detect a new file downloaded into a system?
Thanks for the help.
Platform: Windows
Language: C, C++
from what I understood you want it to get the file final extension,
for this you can check the file extension evrytime to see if it is a .tmp or
.crdownload; but not check for if it is a new file.
Sorry for my bad English,
Hope this helps.

Reading raster directory with GDAL

Is it possible to read an entire directory of Geo - Tiff files "automatically" with GDAL C++ API or do I have to iterate manually on each file and open it with GDALOpen()?
You need to iterate and open each file.

Create Lambda function using Python API (Boto3) by using zip file

I have a zip file ready for the lambda function, but in the doc, the zip file is required to be read as binary (so it seems). I can open the zip file and read the files inside as binary, but how do I read the zip file as a binary?
The doc: https://boto3.readthedocs.io/en/latest/reference/services/lambda.html#Lambda.Client.create_function
nevermind, a simple open(file_name, 'rb').read() does it for me. Forgot the 'b'.....

Zlib and Minizip - How to add a new directory to a .zip file

I have written an application to compress the contents of directory to a .zip file from C++, using zlib and minizip. Minizip is not well documented online but the file "zip.h" in the source code contains comments.
My application uses FindFirstFile and FindNextFile to get a list of all files (and subfolders) in the directory and then, as shown here How do I use Minizip (on Zlib)? creates a .zip file and opens new files within the .zip.
Then I read the source files with fopen and fread and write the contents to the newly created files in the .zip folder. This all works just fine if the directory to be compressed contains only files, and no subfolders, but I cannot decipher from the comments in the source code how I add a new folder to a .zip file and then write files to that folder.
As it turns out, you don't need to create a new directory in the .zip file as a separate step. You can just pass the parameter "foldername\filename.ext" to the zipOpenNewFileInZip method and it will create the "foldername" directory for you then add a new file "filename.ext" to that directory.

Unzip split Zip or/and multi zip in c++ or c or Objective-C

I want to Unzip a multi zip files or a split files directly in my application in iPad.
For this i have minizip a framework in langage C (thats work for a simple .zip file).
So my question is how Unzip a file like .z01, .z02 or/and a file .zip.001, .zip.002 in one of this language C, C++ or/and Objective-C (if possible an example of how make this)?
I try (in Objective-C) too take data of all files and assemble in one file that doesn't worked, so an other response possible is to explain how a split of zip is made (just data cut or somethings else)?
Thanks in advance for your consideration
Finally,
when you split a zip file in multi files like zip.001 zip.002 etc... you just cut the data of source file.
So for unzip this type of files just take data of all files and concat in one file, after this just unzip this new file with framework minizip and in Objective-C use the code project ZipArchive (that use minizip) in google source code.
P.S : Thanks to David H for his help.