Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 465 results for
zipfile
- Page 1
ZipFile Help
Programming
Software Development
12 Years Ago
by baseballer
… void main(String[] args) { Enumeration <?> entries;
ZipFile
zipFile
; if(args.length != 1) { System.err.println("Usage…: Unzip
zipfile
"); return; } try {
zipFile
= new
ZipFile
(args[0]); entries =
zipFile
.entries(); while(entries.hasMoreElements()) { ZipEntry …
Re: ZipFile Help
Programming
Software Development
12 Years Ago
by DavidKroukamp
… void main(String[] args) { Enumeration <?> entries;
ZipFile
zipFile
; if(args.length != 1) { System.err.println("Usage…: Unzip
zipfile
"); return; } try {
zipFile
= new
ZipFile
(args[0]); entries =
zipFile
.entries(); while(entries.hasMoreElements()) { ZipEntry …
Re: ZipFile Help
Programming
Software Development
12 Years Ago
by DavidKroukamp
… just been busy with school look at line 23:[code]
zipFile
= new
ZipFile
(args[0]);[/code]the args[0] is the files… name you can change this to your need ie:[code]
zipFile
= new
ZipFile
("C:\whatever.zip");[/code]
Re: zipfile
Programming
Software Development
14 Years Ago
by iamthwee
…file for writing, and write stuff to it file =
zipfile
.
ZipFile
("test.zip", "w") for name…;samples/*"): file.write(name, os.path.basename(name),
zipfile
.ZIP_DEFLATED) file.close() # open the file again, to …see what's in it file =
zipfile
.
ZipFile
("test.zip", "r") for info…
zipfile
Programming
Software Development
14 Years Ago
by rajivgupta1107
Hi, I am using this
zipfile
.
Zipfile
module to zip around 600 MB of data. But after …, the size of the zipped folder is app. same. file =
zipfile
.
ZipFile
(yesterday_date_time + ".zip","w") os.chdir(rawFileLocation…
Re: zipfile
Programming
Software Development
14 Years Ago
by bumsfeld
… = %d" % len(text2)) # the other way to compress ... # create
zipfile
compressed file # in this case the compressed file is larger… than the original! import
zipfile
as zf z_fname = 'longtext.zip' zout = zf.
ZipFile
(z_fname, 'w', compression=zf.ZIP_DEFLATED) zout…
Zipfile
Programming
Software Development
15 Years Ago
by TheNational22
… no object attrib error. Any ideas? [code] import os import
zipfile
import datetime today = datetime.date.today() yesterday = (today + datetime.timedelta…(days=-1)) file =
zipfile
.
Zipfile
("CT" + yesterday.strftime('%m%d%y') +".zip…
Re: Zipfile
Programming
Software Development
15 Years Ago
by TheNational22
… that was passed from the listdr. [code] import os import
zipfile
import datetime today = datetime.date.today() yesterday = (today + datetime.timedelta…(days=-1)) tFile =
zipfile
.
ZipFile
("c:\\crunchtime\\CT" + yesterday.strftime('%m%d%y…
Re: Zipfile
Programming
Software Development
15 Years Ago
by sneekula
… rewrite your code like this: [code=python]import os import
zipfile
import datetime today = datetime.date.today() yesterday = (today + datetime.timedelta…%d%y') +".zip" # test it print zfilename tFile =
zipfile
.
ZipFile
(zfilename, "w") directory = "c:\\crunchtime" files…
Re: ZipFile question: Modifying contents of file inside archive
Programming
Software Development
12 Years Ago
by nosehat
…'t do that while the file was still open with
zipfile
, which would mean I'd have to log all the… files I'd want to make in each archive, close
zipfile
, then open the archive file again with subprocess.Popen. Unfortunately… if there's a way to do this just with
zipfile
?
ZipFile question: Modifying contents of file inside archive
Programming
Software Development
12 Years Ago
by nosehat
…, files in os.walk(maindir): for currentfile in files: currentzip =
zipfile
.
ZipFile
(os.path.join(root, currentfile), mode='r') innernames = currentzip.namelist…
Re: Quick question RE zipfile.extract
Programming
Software Development
13 Years Ago
by richieking
… create a new zip file. Simple. [CODE]import
zipfile
if __name__ =="__main__": ext=["py"…doc"] nfile=[] #to take new file list ffile=
zipfile
.
ZipFile
("/home/richie/r.zip","w") #… New zip zfile=
zipfile
.
ZipFile
("/home/richie/GUI2Exe.zip","r")# …
Quick question RE zipfile.extract
Programming
Software Development
13 Years Ago
by nosehat
… [URL="http://docs.python.org/library/
zipfile
.html"]
zipfile
module[/URL] to extract all the files with…snippet of code that does the extracting: [CODE] currentzip =
zipfile
.
ZipFile
(os.path.join(zdir, zfile), mode='r') innernames = …the unwanted directories, but it seems like the
zipfile
module ought to be able to just extract the…
Create zip file using zipfile without zipping absolute path
Programming
Software Development
9 Years Ago
by A-M-G
…gt; Folder_to_be_zipped -> {contents of Folder_to_be_zipped}** import os import
zipfile
def zipdir(path, zip): for root, dirs, files in os….path.join(root, file)) if __name__ == '__main__': zipf =
zipfile
.
ZipFile
('Python.zip', 'w') zipdir('C:/Users/UserName/Documents/Folder_to_be_zipped/', zipf…
Re: Quick question RE zipfile.extract
Programming
Software Development
13 Years Ago
by woooee
[URL=http://effbot.org/librarybook/
zipfile
.htm]Effbot's example[/URL] for reading a file into … as long as the files are not huge. [CODE]import
zipfile
file =
zipfile
.
ZipFile
("samples/sample.zip", "r") for…
Re: Zipping folder and it underfolders and files with Zipfile
Programming
Software Development
10 Years Ago
by Ismatus3
…path.normcase(archivePath) outFile =
zipfile
.
ZipFile
(zipFilePath, "w", compression=
zipfile
.ZIP_DEFLATED) for (archiveDirPath, dirNames… not fileNames and not dirNames: zipInfo =
zipfile
.ZipInfo(trimPath(archiveDirPath) + "/")…
Zipping folder and it underfolders and files with Zipfile
Programming
Software Development
10 Years Ago
by Ismatus3
… #-*- coding:Utf-8 -*- import os import time import sys import
zipfile
target_dir = 'C:\Dossier_target' today = target_dir + os.sep + time.strftime('%Y…. Nous utilisons la commande zip pour creer une archive f =
zipfile
.
ZipFile
('%s.zip' %target , 'w') for i in range(len(source…
Re: Zipping folder and it underfolders and files with Zipfile
Programming
Software Development
10 Years Ago
by Gribouillis
… -*-coding: utf8-*- import contextlib import itertools import os.path import
zipfile
ROOT = 'Haplorhini' ROOT_TREE = { 'Tarsiiformes':{ 'Tarsiidae.txt': …x in modified_sequence(dirs): print(x) zip =
zipfile
.
ZipFile
(os.path.join(os.path.expanduser('~'), 'result.…
Python CPU Performance Analysis
Programming
Software Development
9 Years Ago
by cjohnweb
…) 1 0.000 0.000 0.015 0.015
zipfile
.py:405(_ZipDecrypter) 1613 0.016 0.000 0.…1 0.000 0.000 0.000 0.000
zipfile
.py:654(
ZipFile
) 40 0.002 0.000 0.197 0.…) 6 0.017 0.003 0.061 0.010
zipfile
.py:755(_RealGetContents) 1 0.000 0.000 0.…
zlib linking errors
Programming
Software Development
10 Years Ago
by ranar
…) // 5Mb buffer using namespace std; string readZipFile(string
zipFile
, string fileInZip) { int err = UNZ_OK; // error… file_info; // for unzGetCurrentFileInfo unzFile uf = unzOpen(
zipFile
.c_str()); // open
zipfile
stream if (uf==NULL) { cerr <<…
Problem in zipping folder using PYTHON
Programming
Software Development
14 Years Ago
by ziashahid
…(directory) def toZip(directory): zippedHelp =
zipfile
.
ZipFile
(zip, "w", compression=
zipfile
.ZIP_DEFLATED )
zipfile
.debug = 3 list = os.listdir…each) zippedHelp.write(each, os.path.basename(each),
zipfile
.ZIP_DEFLATED) else: addFolderToZip(zippedHelp,entity) zippedHelp.close()…
BadZipFile python
Programming
Software Development
11 Years Ago
by crag0
… I haven't come across anything. import
zipfile
archive_location = <path_to_archive> f =
zipfile
.
ZipFile
(archive_location, 'r') for filename in f.…in __init__ self._GetContents() File "/usr/lib/python2.6/
zipfile
.py", line 716, in _GetContents self._RealGetContents() File &…
[Help] Compile
Programming
Software Development
15 Years Ago
by MAJORG
…() { try {
ZipFile
zipfile
= new
ZipFile
(saveAs); for(Enumeration enumeration =
zipfile
.entries(); enumeration.hasMoreElements();)…).append(zipentry.getName()).toString()))); } }
zipfile
.close(); } catch(Exception exception) {…
Zip hierarchy
Programming
Software Development
14 Years Ago
by kingofkya
… how do you flatten the file hierarchy what works [CODE]
zipFile
=
zipfile
.
ZipFile
(imgSetup[0]+'/'+zipName, 'w') for picId, pathname in enumerate(pic_list…(filedir+'/'+pathname) zip.close() [/CODE] what i am trying [CODE]
zipFile
=
zipfile
.
ZipFile
(imgSetup[0]+'/'+zipName, 'w') for picId, pathname in enumerate(pic_list…
Re: Problem in zipping folder using PYTHON
Programming
Software Development
14 Years Ago
by baki100
… what about the zip filename. [CODE]zippedHelp =
zipfile
.
ZipFile
(zip, "w", compression=
zipfile
.ZIP_DEFLATED )[/CODE] see you using there but it…
java.util.zip help (please)
Programming
Software Development
19 Years Ago
by queen
….zip { File z=new File(zf);
ZipFile
zipFile
=new
ZipFile
(z,
ZipFile
.OPEN_READ); Enumeration zipFileEntries=
zipFile
.entries(); //get entries of oldZipFile.zip addToZip…)zipFileEntries.nextElement(); zos.putNextEntry(ze); //zos is type ZipOutputStream copy(
zipFile
.getInputStream(ze),zos); } zos.close(); } 3) copy(InputStream …
Re: Zip hierarchy
Programming
Software Development
14 Years Ago
by kingofkya
…AttributeError: 'builtin_function_or_method' object has no attribute 'write' [CODE]
zipFile
=
zipfile
.
ZipFile
(picSetup[0]+'/'+zipName, 'w') for picId, pathname in enumerate(picSetup…;= picId and picId <= end: zip.write(filedir+'/'+pathname,
zipFile
, compress_type=None) zip.close() [/CODE] my includes [CODE] …
Re: Zip hierarchy
Programming
Software Development
14 Years Ago
by jice
Sorry, I answered too fast : [CODE]
zipFile
.write(filedir+'/'+pathname,
zipFile
, compress_type=None) [/CODE] zip is not defined in your program, … to write in is the onr you defined here : [CODE]
zipFile
=
zipfile
.
ZipFile
(picSetup[0]+'/'+zipName, 'w') [/CODE]
Extracting .zip files takes far to long
Programming
Software Development
14 Years Ago
by youngwolf0
…destinationFolder ) { try {
ZipFile
zipFile
= new
ZipFile
(startingZip); Enumeration< ? extends ZipEntry> zipCount =
zipFile
.entries(); String dir = …()) { newFile.getParentFile().mkdirs(); } InputStream is =
zipFile
.getInputStream(item); FileOutputStream fos = new FileOutputStream(newfilePath); …
Extracting .zip files takes far to long
Programming
Software Development
14 Years Ago
by youngwolf0
…destinationFolder ) { try {
ZipFile
zipFile
= new
ZipFile
(startingZip); Enumeration< ? extends ZipEntry> zipCount =
zipFile
.entries(); String dir = …()) { newFile.getParentFile().mkdirs(); } InputStream is =
zipFile
.getInputStream(item); FileOutputStream fos = new FileOutputStream(newfilePath); …
1
2
3
8
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC