Welcome! Log In Create A New Profile

Advanced

zip extract file

Posted by emirhan 
emirhan
zip extract file
February 19, 2009 02:28PM
hi all,

I try to exrtact a file in a zip archive but there is an error that I could not find the mistake. Please help me

FindFileRes = zipFindFile(ArchiveName, FindFile,False)
IF FindFileRes > 0 THEN
ExtractErrorCode = zipExtractFile(ArchiveName,FindFileRes,"C:\temp")
The file is found, andthe error is "invalid path" but the part name is correct
Louis Verbraak
Re: zip extract file
February 19, 2009 03:14PM
Hello Emirhan,

The pathname should end with a backslash: 'C:\temp\'.

HTH.
emirhan
Re: zip extract file
February 19, 2009 03:42PM
I used the pathname with backslash but, it extract the file with its directory, I need to extract only the selected file, I don't need file with its directory folder
Louis Verbraak
Re: zip extract file
February 19, 2009 05:49PM
Hello Emirhan,

I don't know if it is possible, but the constant zipNone extracts the file in the directory without it's original tree-structure. Perhaps you can use:

ExtractErrorCode = zipExtractFile(ArchiveName,FindFileRes,"C:\temp"+zipNone)

HTH.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: