 |
VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
|
上一篇主題 :: 下一篇主題 |
發表人 |
內容 |
garfield Site Admin

註冊時間: 2003-01-30 文章: 2160
第 1 樓
|
發表於: 星期四 六月 23, 2005 10:26 am 文章主題: Freeware simple ZIP component |
|
|
開發者網頁: http://www.molestudio.com/tools/molezip/
下載處: http://www.molestudio.com/MoleZip.zip
VFP程式範例: http://www.fpress.com/revista/Num1103/Truco.htm
截錄如下:
代碼: |
************************
* 請記得要先用 regsvr32.exe 來註冊molezip.dll
oZip = createobject("MoleZip.ZipFile")
*
* Añadir ficheros: -----------------------------------------------
*
oZip.Create("C:\Prueba.Zip")
oZip.PackInplace( "Molezip.dll", ; && 檔案在壓縮檔內的名稱, 最好有含路徑名
"molezip.dll", ; && 實際上檔案放置的位置, 最好有含路徑名
9 ) && 壓縮率 (0 到 9)
*如果你須要再加一些檔案進入ZIP檔, 須將每個檔案用 oZip.PackInplace( ) 來加入.
oZip.Close
*
* Extraer ficheros: ----------------------------------------------
*
oZip.Open("C:\Prueba.Zip")
oLista = oZip.Enumerate()
*
* Contamos ficheros:
*
i=0
do while oLista.Next
i=i+1
enddo
? i
*
* Extraemos todos:
*
oLista.reset
do while oLista.Next()
oZip.Extract( oLista.value, ; && Nombre del fichero en el Zip
"_" + oLista.value ) && Nombre del fichero destino
enddo
oZip.Close
release oZip
|
_________________ 利用>>搜尋<<的功能會比問的還要快得到答案. |
|
回頂端 |
|
 |
|
|
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
|
|