﻿Hola amigos:

Este Sample está basado en la Demo Minigui Ext. Samples\Zip

View -->  http://www.hmgforum.com/viewtopic.php?f=24&t=5808&p=56425&hilit=mustafa#p56425

[ Selection Extensions for Back-Up ]
Por defecto está configurado para hacer Zip de todos los Ficheros [*.*]
además están las distintas extensiones más usuales, al pulsar la 
extensión el puntero del ratón ira a Buscar Carpeta para el Zip 

[ Create Backup ]
Podemos hacer Back_Up de cualquier Carpeta que se salvará,
el  fichero ZIP con el Nombre de  la Carpeta , Fecha y Hora
y extensión: (' *.*',' *.Docx ',' *.Xlsx ',' *.Dbf',' *.Pdf',' *.Jpg') 
ejemplo: \Commpress_Zip\Datos_06102018-5154_[•.•].Zip (no me deja poner 
[*.*] ) se pone este símbolo ->[•.•] y si el Zip solo
es de   *.Dbf'-->  \Commpress_Zip\Datos_06102018-5154_[Dbf].Zip

[Password] 
Puede ser Automatico y se genera el número de Password o Manual

[ View Zip ]
Mediante Botón -> [ View Zip ] veremos que el Fichero->Control.dbf 
que nos indica en "Dir_Zip" el camino donde se ha iniciado el Zip
ejemplo: C:\Sample\Datos\   en NOM_ZIP Datos_06102018-5154_[Dbf].Zip
DAY 06.10.2018 TIME 14:51:54 

Opciones:  Delete Record , Delete DataBase,Listado DataBase

[ Recover Backup ]
Retornamos al estado inicial antes de hacer Zip 
entraremos en Carpeta \Commpress_Zip\ y elegiremos el Zip  a 
Descomprimir en nuestro caso el ejemplo --> Datos_06102018-5154_[Dbf].Zip

*----------------------------------------------------------------------*
MUY IMPORTANTE !!!
La Functions de Hmg UNCOMPRESS no tiene habilitado 
poder cambiar de Carpeta ni crear otra Nueva

 CompressFiles( <cZipfile> , <aFileNames> , [<bBlock>] , [<lOovr>] ) -> Nil
 UncompressFiles( <cZipfile> , [<bBlock>] ) -> Nil

*--------------------------- Sample ------------------------------------*

 cCurDir := GetCurrentFolder()

 Funciones de Minigui-Ext
              
              COMPRESS aFiles ;
	           	TO 'Compress_Zip\'+ Date_Copy;
		        BLOCK {|cFile, nPos| ProgressUpdate( nPos, cFile, .T. ) } ;
		        LEVEL 9 ;
		        PASSWORD ALLTRIM( rNum ) ;  <---- rNum = "1234567890" 
		        OVERWRITE ;
		        RESULT lSuccess

              UNCOMPRESS cArchive ;
			EXTRACTPATH cCurDir + "\UnCompress_Zip" ;    
			BLOCK {|cFile, nPos| ProgressUpdate( nPos, cFile, .T. ) } ;
			PASSWORD ALLTRIM( rNum ) ;   <---- rNum = "1234567890" 
			RESULT lSuccess ;
			CREATEDIR

Mustafa López 26-11-2018


MUY IMPORTANTE: Compilar con los Bats de 32bits o 64 bits no con el IDE 
*----------------------------------------------------------------------------*

Hello friends:

This Sample is based on the Demo Minigui Ext. Samples\Zip   

View -->  http://www.hmgforum.com/viewtopic.php?f=24&t=5808&p=56425&hilit=mustafa#p56425

[Selection Extensions for Back-Up]
By default it is configured to make Zip of all Files [*. *]
In addition, there are the most common extensions, by pressing the
extension the mouse pointer will go to Find Folder for the Zip

[Create Backup]
We can do Back_Up of any Folder that will be saved,
the ZIP file with the Name of the Folder, Date and Time
and extension: ('*. *', '* .Docx', '* .Xlsx', '* .Dbf', '* .Pdf', '* .Jpg')
example: \ Commpress_Zip \ Datos_06102018-5154_ [•. •] .Zip 
(will not let me put [*. *] )this symbol is set -> [•. •] and if 
the Zip only is from * .Dbf '-> \ Commpress_Zip \ Datos_06102018-5154_ [Dbf] .Zip

[Password]
It can be Automatic and the Password or Manual number is generated

[View Zip]
By means of Button -> [View Zip] we will see that the File-> Control.dbf
that tells us in "Dir_Zip" the path where the Zip has started
example: C: \ Sample \ Data \ in NOM_ZIP Data_06102018-5154_ [Dbf] .Zip
DAY 06.10.2018 TIME 14:51:54

Options: Delete Record, Delete DataBase, DataBase List

[Recover Backup]
We return to the initial state before doing Zip
we will enter the folder \ Commpress_Zip \ and choose the Zip to
unzip the example in our case -> Datos_06102018-5154_ [Dbf] .Zip

* ------------------------------------------------- --------------------- *
VERY IMPORTANT !!!
The Functions of Hmg UNCOMPRESS does not have enabled
You can change the Folder or create another New

 CompressFiles (<cZipfile>, <aFileNames>, [<bBlock>], [<lOovr>]) -> Nil
 UncompressFiles (<cZipfile>, [<bBlock>]) -> Nil

* --------------------------- Sample --------------------- --------------- *

 cCurdir: = GetCurrentFolder ()

 Funciones de Minigui-Ext

 	     COMPRESS aFiles ;
	           	TO 'Compress_Zip\'+ Date_Copy;
		        BLOCK {|cFile, nPos| ProgressUpdate( nPos, cFile, .T. ) } ;
		        LEVEL 9 ;
		        PASSWORD ALLTRIM( rNum ) ;  <---- rNum = "1234567890" 
		        OVERWRITE ;
		        RESULT lSuccess

              UNCOMPRESS cArchive ;
			EXTRACTPATH cCurDir + "\UnCompress_Zip" ;    
			BLOCK {|cFile, nPos| ProgressUpdate( nPos, cFile, .T. ) } ;
			PASSWORD ALLTRIM( rNum ) ;   <---- rNum = "1234567890" 
			RESULT lSuccess ;
			CREATEDIR


Mustafa López 26-11-2018

VERY IMPORTANT: Compile with the 32bit or 64bit Bats not with the IDE
* ------------------------------------------------- --------------------------- *
