Adding files to zip with another name


Adding files to zip with another name

Postby Gareth on Thu Nov 11, 2004 10:14 am

Hello.

Is it possible to add a file but give it a different name in the zip file?

i.e.
Add c:folder1a.txt as 1.txt
Add c:folder2a.txt as 2.txt


cheers,
Gareth
Gareth
 
Posts: 1
Joined: Thu Nov 11, 2004 10:12 am
Location: Australia

Postby John on Fri Nov 12, 2004 12:32 pm

No there wasn't a function to add files on such way, but I've done a new version which has the rename function that will act as you need.
First add the files into the zip file and then use the rename function:

zip.rename( "a.txt", "1.txt" )

You should download 3.30 version to have this functionality.
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain


Return to Zip

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Fatal error: Not able to open ./cache/data_global.php in D:\Hosting\6480136\html\ForosBB3\includes\acm\acm_file.php on line 106