zip

Base64 Encode a ZIP file using Classic ASP and VB Script

混江龙づ霸主 提交于 2021-01-27 18:31:32
问题 I have a zip file, which contains one CSV file. I need to Base64 encode this zip file to send to eBay (using their API). I used this website: http://www.opinionatedgeek.com/DotNet/Tools/Base64Encode/ which works nicely, I upload my zip file and it returns a base64 encoded string which eBay likes. I need to do what this website does, but using Classic ASP and VB Script. I already have a base64 encode function, from here: http://www.motobit.com/tips/detpg_base64encode/ so I don't need a script

adding remote files to a zip file

回眸只為那壹抹淺笑 提交于 2021-01-27 18:30:49
问题 Is there a way to add files to a zip file from another server with php's zip extension? ie. addFile(array('localfile.txt,'http://www.domain.com/remotefile.txt')) //(that obviously does not work) I suppose I can download the files to a temporal folder and then add them to the zip file, but I was looking for a more automated solution or a function already made 回答1: use file_get_contents() and ZipArchive::addFromString() $zipArchiveInstance->addFromString($filename, file_get_contents($mediaUrl))

Can't take file names with spaces in shell script for loop

眉间皱痕 提交于 2021-01-27 12:24:35
问题 I am trying to take filenames with spaces Get them into a for loop zip each file Once zipped, remove the original using below: for appdir in $(ls /home/location/$dirname); do for logFile in $(find /home/location/$dirname/$appdir -type f -mtime +10 \( ! -iname "*.zip" ! -iname "*.gz" \)); do echo $logFile Files I am trying to zip which has spaces: /home/location/hdd1/domain/servername/EXT1/ET SOME To FILENAME/xml/sdlfkd.xml /home/location/hdd1/domain/servername/EXT1/ET SOME To FILENAME2/xml

How can I uncompress a gzip file in javascript?

ぃ、小莉子 提交于 2021-01-22 16:09:54
问题 I have gotten an ArrayBuffer data (called s as follows which consist of many blocks) from our serve side,the blob is generated as follows: var blob=new Blob([s.slice(4,82838)]); but the blob I have made is a gzip data;How can I uncompress it in javascript? I have tried zip.js but it didn't work?(and I still puzzled why it doesn't work). please tell me a method to un-compress the blob,thank you. (my English is poor,sorry) 回答1: In the browser I have used pako You may do something like.. var

Node.js read a file in a zip without unzipping it

♀尐吖头ヾ 提交于 2021-01-20 16:41:18
问题 I have a zip file (actually it's an epub file) I need to loop through the files in it and read them without unzipping them to the disk. I tried to use a Node.js library called JSZip but the content of each file is stored in memory in Buffer and whenever I try to decode the buffer content to string the content returned is unreadable Here's the code I tried: const zip = new JSZip(); // read a zip file fs.readFile(epubFile, function (err, data) { if (err) throw err; zip.loadAsync(data).then

Node.js read a file in a zip without unzipping it

五迷三道 提交于 2021-01-20 16:38:32
问题 I have a zip file (actually it's an epub file) I need to loop through the files in it and read them without unzipping them to the disk. I tried to use a Node.js library called JSZip but the content of each file is stored in memory in Buffer and whenever I try to decode the buffer content to string the content returned is unreadable Here's the code I tried: const zip = new JSZip(); // read a zip file fs.readFile(epubFile, function (err, data) { if (err) throw err; zip.loadAsync(data).then

Unzip a password protected file in vbsript

旧城冷巷雨未停 提交于 2021-01-20 13:39:31
问题 i am facing a trouble here,Could you please tell me how to unzip a password protected field in vbscript? I have a code which runs perfectly,but it asking password each time when it runs pathToZipFile="C:\folder.zip" extractTo="C:\" set sa = CreateObject("Shell.Application") set filesInzip=sa.NameSpace(pathToZipFile).items sa.NameSpace(extractTo).CopyHere(filesInzip) I need a code which will not ask password in run,Please help,Thank you!! 回答1: AFAIK the Shell.Application object doesn't support

Unzip a password protected file in vbsript

孤者浪人 提交于 2021-01-20 13:38:05
问题 i am facing a trouble here,Could you please tell me how to unzip a password protected field in vbscript? I have a code which runs perfectly,but it asking password each time when it runs pathToZipFile="C:\folder.zip" extractTo="C:\" set sa = CreateObject("Shell.Application") set filesInzip=sa.NameSpace(pathToZipFile).items sa.NameSpace(extractTo).CopyHere(filesInzip) I need a code which will not ask password in run,Please help,Thank you!! 回答1: AFAIK the Shell.Application object doesn't support

Add .gz file to .zip archive without decompressing and re-compressing?

|▌冷眼眸甩不掉的悲伤 提交于 2021-01-05 07:11:35
问题 Assume that the gzip file and zip archive both use DEFLATE. Since both would store the same raw compressed data for the specific file, is it possible to add a pre-compressed .gz file to an existing .zip archive? Some metadata would likely be lost (or not available), but I am more concerned with the raw file data. 回答1: Yes. I don't remember why I wrote this, but I'm sure there was a very good reason. Make sure you read the caveats in the comments. /* gz2zip.c version 1.0, 31 July 2018

Add .gz file to .zip archive without decompressing and re-compressing?

送分小仙女□ 提交于 2021-01-05 07:10:35
问题 Assume that the gzip file and zip archive both use DEFLATE. Since both would store the same raw compressed data for the specific file, is it possible to add a pre-compressed .gz file to an existing .zip archive? Some metadata would likely be lost (or not available), but I am more concerned with the raw file data. 回答1: Yes. I don't remember why I wrote this, but I'm sure there was a very good reason. Make sure you read the caveats in the comments. /* gz2zip.c version 1.0, 31 July 2018