Rename function for UNZIP


Rename function for UNZIP

Postby wizzkidd on Mon Oct 30, 2006 8:35 pm

Hi again,

I've noticed that there is a nice rename function built in to rename when zipping a file, however I need to use a rename function when unzipping the file.

I was wondering if there was a built in method of doing this.

At the moment, my method involves something like this...

'UNZIP THE FILE
...
...

'USE THE FSO TO READ THE CONTENTS OF myDestFolder
...
...

'PERFORM A RENAME ROUTINE ON EACH FILE IN THE FOLDER
...
...

'THEN PERFORM MY 'jpeg resizing function' ON EACH FILE
...
...


I was hoping that i could use the following code:

numberOfFiles = objZip.GetZipItemsCount
For unzipedFiles = 0 to numberOfFiles-1
response.write objZip.GetZipItem_FileName(unzipedFiles) & "<br>"
Next

And simply adjust it so that the RENAME occurs beforehand so that .GetZipItem_FileName would contain the renamed filename, this would mean I could perform my 'jpg resizing function' in the loop too!

Catch my drift?

So, is it possible to perform a 'rename' of somekind so that the EasyZIP object's attribute .GetZipItem_FileName would be populated correctly?
wizzkidd
 
Posts: 5
Joined: Mon Oct 30, 2006 7:19 pm

Postby John on Mon Oct 30, 2006 8:50 pm

No there is no way to do that on aspEasyZIP, the best way is what you are already doing.
John Lohmeyer
MITData, S.C.P
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain

Postby wizzkidd on Tue Oct 31, 2006 3:21 am

Thanks once again for your speady reply
wizzkidd
 
Posts: 5
Joined: Mon Oct 30, 2006 7:19 pm


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