login about faq

Hi,

maybe a simple question, but I can't find the solution.

I'm trying to add a file (for e.g. c:\temp\Thisfile.txt) to a zipfile, but under the directory TXT in the ZIPfile (and rename it if possible).

So c:\temp\Thisfile.txt needs to be in TXT\file.txt in the ZIPfile. Is this possible ?

I tried 'ZIP.appendonefileordir("c:\temp\Thisfile.txt",0) but then the file is created in the root.

Many thanks Glenn

asked Aug 03 '12 at 03:33

SSWGlenn's gravatar image

SSWGlenn
681012


Nevermind, I solved it myself.

I loaded the file in memory and used ZIP.appenddata('TXT'&|fileinMemory|,'NewFileName.txt')

link

answered Aug 03 '12 at 07:44

SSWGlenn's gravatar image

SSWGlenn
681012

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×87

Asked: Aug 03 '12 at 03:33

Seen: 745 times

Last updated: Aug 03 '12 at 07:44

powered by OSQA