The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Makefile cant create new install path mercury Shell Programming and Scripting 2 02-10-2009 01:29 AM
Want to create 3 different new directories under the same path Llb UNIX for Dummies Questions & Answers 1 11-21-2008 05:21 AM
Create path which has length=1023. mansa Shell Programming and Scripting 2 11-16-2008 08:44 AM
Parse value from multiple row to create the path shirleyeow Shell Programming and Scripting 13 05-05-2008 09:22 AM
Create Variable for a PATH mmignot Shell Programming and Scripting 2 11-06-2006 03:09 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-02-2009
spaze spaze is offline
Registered User
  
 

Join Date: Sep 2009
Posts: 2
How to create zip file without path?

Hello,

I have generated a PHP script that creates files needed for EPUB file.

I have a temp directory where these files are created into and then needs to be zipped. The directory structure is:

mimetype
content.opf
index.html
stylesheet.css
toc.ncx
META-INF
META-INF/container.xml

I use the following commands to create the EPUB file:

system ("zip -q0Xj $zipFile mimetype") ;
system ("zip -qXr9Dj $zipFile $myDir/mimetype $myDir/content.opf $myDir/index.html $myDir/stylesheet.css $myDir/toc.ncx $myDir/META-INF $myDir/META-INF/container.xml") ;

The problem is the the "j" option removes the path from all files, but I need the zip file to have all these files in the root of the zip except the META-INF directory and its file containes.xml must be at the root of the zip file.

So how can I create a zip file containing just these files and that one directory without the full path?

Thanks for your help!
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0