Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Extract file on zip with folders
Message
From
12/09/2016 11:49:56
 
 
To
12/09/2016 09:40:29
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2012 R2
Database:
Visual FoxPro
Application:
Desktop
Virtual environment:
Hyper-V
Miscellaneous
Thread ID:
01640677
Message ID:
01640723
Views:
128
>Chilkat's ZIP control has a "to ram" option.
>
Thanks

>>>>the file's folder position is not fixed.
>>>>Need to cross the tree.
>>>>I need something similar to ADIR ()
>>>
>>>This will return .T. if a file or a folder exists somewhere in the zip file and could be extracted.
>>>
>>>
>>>? ExtractFileOrFolderInZipFile(m.ZipFile, m.FileOrFolderToExtract, m.TargetFolder)
>>>
>>>FUNCTION ExtractFileOrFolderInZipFile(ZipFile AS String, ToExtract AS String, Location AS String, ShellExplorer AS Object, Tree AS String)
>>>
>>>	LOCAL ShellObject  && edited
>>>
>>>	IF PCOUNT() < 4
>>>		m.ShellExplorer = CREATEOBJECT("Shell.Application")
>>>		m.Tree = ""
>>>	ENDIF
>>>
>>>	FOR EACH m.ShellObject IN m.ShellExplorer.NameSpace(m.ZipFile + IIF(EMPTY(m.Tree),"","\" + m.Tree)).items
>>>
>>>		IF UPPER(m.ShellObject.Name) == UPPER(m.ToExtract)
>>>			m.ShellExplorer.NameSpace(m.Location).CopyHere(m.ShellExplorer.NameSpace(m.ZipFile).items.Item(m.Tree + m.ToExtract))
>>>			RETURN .T.
>>>		ELSE
>>>			IF m.ShellObject.IsFolder AND ExtractFileOrFolderInZipFile(m.ZipFile,m.ToExtract,m.Location,m.ShellExplorer,m.Tree + m.ShellObject.Name + "\")
>>>				RETURN .T.
>>>			ENDIF
>>>		ENDIF
>>>		
>>>	ENDFOR
>>>
>>>	RETURN .F.
>>>
>>>ENDFUNC
>>>
>>
>>What if I want to extract the files into ram, without passing for a file?
Previous
Reply
Map
View

Click here to load this message in the networking platform