There are many examples of compressing files in VB.Net. So many of these examples are using third party libraries which is just not neccesarry. People were saying that files and archives exceeding 4Gb couldn't be used... I hate restrictions and decided to "Stick it to Microsoft" To get a better understanding of Zip files and their contents I set about writing my own Zip file generator from the ground up (Still using Phil Katz's Zip algorythem). Eventually I successfully built my own Zip and ZIP64 archives byte by byte. I then looked at my work and thought, now I have …

Member Avatar
Member Avatar
+1 forum 3

I am struggling to get the following code to work in Python 3. from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d.art3d import Poly3DCollection import matplotlib.pyplot as plt fig = plt.figure() ax = Axes3D(fig) x = [0,1,1,0] y = [0,0,1,1] z = [0,1,0,1] #verts = [zip(x, y,z)] verts = list(zip(x, y, z)) ax.add_collection3d(Poly3DCollection(verts)) plt.show() The next to last line gives the following error: TypeError: zip argument #1 must support iteration How do I fix this?

Member Avatar
Member Avatar
+0 forum 2

Hello friends, I am stuck at a point in downloading multiple files as a single zip such that - the generated zip by my code for user download seems to be not a properly formed one. While trying to open the generated zip, I get an error as - "Cannot open file: it does not appear to be a valid file" I'd be glad if someone could review the code below and help me understand what might be missing here. Thank you! //Create list for file URLs - these are files from all different locations List<String> filenames = new ArrayList<String>(); …

Member Avatar
Member Avatar
+0 forum 7

This is a simple problem that for some reason I can't get to work. The problem I created for myself was to use call a function from a function using *args and print out the question and solution. I want the output to vary as the *args can accept any number of paramters. The basic function. def sum_args(*args): return sum(args) So the output that I would want is: given a call like `run(sum_args, 1,2,3,4)` would be, but of course the user could put any number of entries in so I can't hard code it. `1+2+3+4 = 10` Attempt def run(func,*args): …

Member Avatar
Member Avatar
+0 forum 2

if i have 10 files in a folder then how to make a zip file for download. any suggestion here or any links . please reply... thanks for reply in advance....

Member Avatar
Member Avatar
+0 forum 4

Okay, there may already be a post out here that is similar to this, but I wasn't able to find anything that was helpful. Scenario: I have a zip folder that contains a folder structure (web site) and batch file. Objective: I need something that will enable a user to download the zipped folder - but, while it is being downloaded, it will unzip the folder, save the folder to their Desktop and run the batch file. I have an EXE file that does this, however, since a majority of the users will only have basic rights on their computers, …

Member Avatar
Member Avatar
+0 forum 1

Hi to everyone, I am a begginer on php so maybe this question will appear to simple to someone. My issue is that I want to output a list with all .zip files that are in my site directory. Also for each file I want some details for exemple: Filename: Simple.zip Size: 3.2Mb Created Date: 11/11/2013 File Path: .... Could someone help me with my problem?! Please consider that I am a beginner and some php functions that you may suggest to me may not be very usefully in my case :(

Member Avatar
Member Avatar
+0 forum 2

I am still new to programming and hoping someone can point me in the best direction. I am creating a script that monitors a directory and creates a zip file and then mails the archive. I have successfully monitored the dir and can zip the files. I am somewhat lost on what the best approach would be to assure the archive is 3MB or less. I was thinking check file size of x files and then create the zip file. Once the zip was created check the size and if needed remove files. Something tells me I am thinking to …

Member Avatar
Member Avatar
+0 forum 1

I have created an application which compress & convert a file in .rar or .zip format.But it can't be open and give error that the file is damaged!!! string filetocompress = txtSourceFilePath.Text.Substring(txtSourceFilePath.Text.LastIndexOf("\\")+1); MessageBox.Show(filetocompress); FileStream sourcefile = File.Create(txtSourceFilePath.Text); FileStream destination = File.Create(txtTargetFilePath.Text + filetocompress + ".gz"); byte[] buffer = new byte[sourcefile.Length]; sourcefile.Read(buffer, 0, buffer.Length); using (GZipStream output = new GZipStream(destination, CompressionMode.Compress)) { Console.WriteLine("Compressing {0} to {1}.", sourcefile.Name, destination.Name, false); output.Write(buffer, 0, buffer.Length); } sourcefile.Close(); destination.Close();

Member Avatar
Member Avatar
+0 forum 1

I have the following file structure. Some files are dynamically added to a zip file and downloaded. uploads ----- 1 ---------- test.jpg ---------- another-test.jpg ----- 2 ---------- yetanotherfile.jpg ----- 3 ---------- evenmorefiles.jpg However, when I unzip the downloaded file it keeps that same structure (only with some files missing) and the unzipped folder is called upload. How can I: * Change the name of the unzipped folder * Get rid of the structure My code for generating the file is if ($_GET['download']== 'true'){ $downloadarray = array(); while($row = mysql_fetch_array($res)){ $downloadarray[] = $row['loc'] ; } $zipname = rand(0,9999) . 'download.zip'; $zip …

Member Avatar
Member Avatar
+0 forum 5

I want to add a zip file into installation setup in c sharp. I am using visual studio 2010.

Member Avatar
Member Avatar
+0 forum 4

Hello Friends I am VB.NET Programmer and currently working on a project where i have to copy the rar/zip file from any folder. While pasting it, it should extract the rar/zip contents automatically. I am done with my extracting part but Here are some problems i am facing Problem 1 : How should i detect that a rar/zip file is copied by the system ? Problem 2 : How to track the file in which it has to be paste ? All operation will be done from system context menu. Kindly Help me Thank You

Member Avatar
Member Avatar
+0 forum 3

So I've been working on a page to locate shops based on zip code and mile distance. I used this tutorial as a walk-through http://htmlcampus.com/build-a-zip-code-store-locator-application-in-php/ Now I've changed a couple of things like the mySQL table is called locations instead of zip_codes. I've tested it and it connects to the database and all, but it just says that **no results were found**, even when I enter in an exact zip code of one of the shops (90278 or 92602). http://bit.ly/Me2d1M Below is my code for the page (password left out). I hope someone could spot what might be wrong, something …

Member Avatar
Member Avatar
+0 forum 7

i wanna extract many ziped folders, but i am not successfull. i have find out problem but not the solution of that. whenever i pass an array or associative array in a for loop to code given below to extract all ziped folders to unzip it stop working. $zip = new ZipArchive; if ($zip->open($arrayName) === true){ //not work } but i pass only one file name it accept but in case of array i dont work. $zip = new ZipArchive; if ($zip->open('abc.zip') === true){ //it will work } so now i wanna know that how i can extract many ziped …

Member Avatar
Member Avatar
+1 forum 4

Hi. I´m writing my first python program - a text adventure game. I want to have a list of possible things a dog could eat, what´s bad about them, how bad they are. So, I thought I´d do this: badfoods = [] keys = ['Food','Problem','Imminent death'] food1 = ['alcohol', 'alcohol poisoning', 0] food2 = ['anti-freeze', 'ethylene glycol', 1] food3 = ['apple seeds', 'cyanogenic glycosides', 0] There are actually around 40 foods I want to include. I know I can do this: badfoods.append(dict(zip(keys,food1))) badfoods.append(dict(zip(keys,food2))) etc. Or, I could have written it another way for all 40 foods: [{'Food':'alcohol', 'Problem':'alcohol poisoning', 'Imminent …

Member Avatar
Member Avatar
+0 forum 1

Currently running python 2.7 on windows 7. I have an app created with wx python and compiled with py2exe. This app has an update utility that polls an update server at startup. If an update is found it downloads the new executable file (approx. 7mb) and makes the switch. It works well, but when I change 3 lines of code and publish an update the end user has to again download an entire 7+ mb file. I know that py2exe creates a zip archive containing the .pyo's and I would like to be able to add/remove/overwrite those .pyo files while …

Member Avatar
+0 forum 0

Another task from C++ forum is trivial in Python even taking handicap of not using Counter.

Member Avatar
+0 forum 0

Hi, Anyone know how to access the contents of a password protected zip file via VB.Net? Like read, write, modify the contents as if its a regular folder. I have absolutely no clue how to the above. Its the final missing piece from my program. Any help would be very much appreciated. Thank you!

Member Avatar
+0 forum 0

First of all, I would like to apologize if I have posted this in the wrong forum. If I have made this mistake, please tell me where this should be placed and I will quickly fix that. Okay, now to the problem. I downloaded a zip file and extracted it into a file called [I]Game[/I] on my desktop. I extracted it. There is an executable file along with a bunch of folders. I put and extracted other zip files into the folders I just mentioned. Then, I tried to run the executable file and got this message: Archive: /home/amber/Desktop/Game/ePSXe/ePSXe.exe [/home/amber/Desktop/Game/ePSXe/ePSXe.exe] …

Member Avatar
Member Avatar
+0 forum 2

Hi I would like a crhon job to do the following: 1) copy a zip file, eg: [url]www.somesite.com/file.zip[/url] to [url]www.mysite.com/file.zip[/url] 2) unzip such file 3) move the unziped files to another directory, after reading one of those files. Please, I have no idea on how to do this... (my thing is C#.net) Thanks for your sugestions :)

Member Avatar
Member Avatar
+0 forum 4

Hi All, I'm sorta stuck on this one. Hopefully some of you folks can help me out... My question in a nutshell: Is there a way to have PHP extract all of the files from an archive without preserving the directory structure? Extra Info: A site I'm working on allows users to upload pictures. I've just added support for Zip files, so that PHP extracts the images from the Zip, moves them to the appropriate directory, and catalogs them in the MySQL database. To do this, the names of the files are put into an array. The problem is that …

Member Avatar
Member Avatar
+0 forum 2
Code Snippet Mass Unzipper

My friend gave me 10,000+ ROM's for Sega, SNES, NES, and GBA. They where all individually zipped. I go fed up trying to unzip them one by one, and decided to write a script to do it for me. It unzipped about 5,000 in under a minute. Python's zipfile module is nice, but it sometimes wont open some zip files. It throws an error saying something like "Corrupt Zip File", but seems to unzip fine with 7Zip. I use 7Zip for all my compression needs now a days, but this script was a learning experience, so I though I would …

Member Avatar
Member Avatar
+0 forum 2

Is it possible to e-mail an .exe or .zip file so that only the recipient can unzip it & it cannot be sent from the recipient to a second recipient? I.e. the file cannot be re-sent from that person to another person. SNIP

Member Avatar
Member Avatar
+0 forum 3

Just wondering if anybody here has any experience of writing programs in C or C++ to use and manipulate the Master File Table, to restore previously deleted files?.....

Member Avatar
Member Avatar
+0 forum 10

The End.