soubor = '"' + najdi_plochu() + 'licence-' + alltrim(chrtran(m.gchom_path,  " ./\,-:", "")) + '"'
cmd = m.gcini_path + "7za a -tzip " + m.soubor + " " + m.gchom_path + "food_??t.*"
RUN &cmd
MESSAGEBOX("soubor naleznete na ploše pod jménem" + CHR(13) + m.soubor + CHR(13) + CHRTRAN(SUBSTR(UPPER(m.soubor), RAT("\", m.soubor)+1), '"', '') + ".ZIP," + CHR(13) + "odešlete jej na mail LICENCE@ALTOPRAHA.CZ",1+64,"Licence")



** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 
FUNCTION najdi_plochu
CLOSE DATABASES 
CREATE TABLE (m.gcpri_path + "soubory") (nazev c(99), delka I, atrib c(5))
FOR pismenko = ASC("A") TO ASC("Z")
   pocet = ADIR(qwe, CHR(m.pismenko) + ":\docum*", "D")
   FOR iii = 1 TO pocet
      IF "D" $ qwe(iii, 5)
         INSERT INTO (m.gcpri_path + "soubory") (nazev, delka, atrib) VALUES ;
             (CHR(m.pismenko) + ":\" + qwe(iii, 1) + "\", qwe(iii, 2), qwe(iii, 5))
      ENDIF
   ENDFOR  
ENDFOR 
DELETE FOR .not. "D" $ atrib
FOR i = 1 TO 9
 SCAN FOR delka >= 0
   nazev = ALLTRIM(soubory.nazev)
   REPLACE delka WITH -1111
   pocet = ADIR(qwe, m.nazev + "*", "D")
   FOR iii = 1 TO pocet
      IF "D" $ qwe(iii, 5) .and. LEFT(qwe(iii, 1), 1) # "."
         INSERT INTO (m.gcpri_path + "soubory") (nazev, delka, atrib) VALUES ;
              (m.nazev + qwe(iii, 1) + "\", qwe(iii, 2), qwe(iii, 5))
      ENDIF
   ENDFOR  
 ENDSCAN 
ENDFOR 
REPLACE ALL nazev WITH LOWER(nazev)
INDEX on nazev TAG nazev
LOCATE FOR "\plocha\  " $ nazev
IF .not. FOUND()
   LOCATE FOR "\desktop\  " $ nazev
ENDIF 
RETURN ALLTRIM(nazev)