*:*****************************************************************************
*: Procedure file: FTP_ZKOUTHDS
*: Uprava pro prenost karet pro HDS - Mangaloo
*:*****************************************************************************
PARAMETERS  crd_path, exp_path
IF EMPTY(exp_path) OR PARAMETERS() < 2
  exp_path = "c:\ftp\data\"
ENDIF 
crd_path = crd_path + IIF(RIGHT(m.crd_path,1)="\", "", "\")
exp_path = exp_path + IIF(RIGHT(m.exp_path,1)="\", "", "\")
if ! directory(m.exp_path)
   mkdir (m.exp_path)
ENDIF

CLOSE ALL
clos data
CLEAR WINDOW
set Safety Off
*m.crlf=CHR(13)+CHR(10)
vysledek = CHR(13)+CHR(10)

IF FILE(m.crd_path + "hot_kred.dbf")
  use (m.crd_path + "hot_kred")
  SELECT typ, cis_kred, dat_naroz, prijmeni, krestjm FROM (m.crd_path+"hot_kred") INTO TABLE (m.exp_path+"kiwikarty")
  vysledek = vysledek + "[1#G]Kiwikarty vytvoreny OK" + CHR(13)+CHR(10)
ENDIF 

clos data

