*!*****************************************************************************
*!      Procedure: nastav_rautexportpath
*!*****************************************************************************
*PROCEDURE nastav_rautexportpath

#DEFINE DEFAULT_EXPORTPATH "..\tmp\"

gcrautexportpath     = get_ini(m.machine, "RautExportPath")

IF EMPTY(m.gcrautexportpath)
    gcrautexportpath = get_ini("Config", "RautExportPath")
ENDIF 

IF EMPTY(m.gcrautexportpath)
**    gcrautexportpath = GETDIR("..\", "Vyber adresar k exportu rautu", "") zruseno, pac to votravuje, ale vytvori radek v .ini, aby to slo snadno nastavit tam
ENDIF 

IF EMPTY(m.gcrautexportpath)
    gcrautexportpath = DEFAULT_EXPORTPATH
ENDIF

IF ! EMPTY(m.gcrautexportpath)
    backslash( @m.gcrautexportpath )
    DO mk_dir WITH m.gcrautexportpath
    IF STRTOFILE(m.gcrautexportpath, m.gcrautexportpath + "testrautexportpath.txt") = 0
        gcrautexportpath = ""
    ELSE
        DELETE FILE m.gcrautexportpath + "testrautexportpath.txt"
    ENDIF 
ENDIF

