@ECHO Off
@REM -- H2XCOM.BAT - 31.8 PGO/DIV+HTML(OQX=ANY) IFC - ........./2006APR02PE
@REM --       ..2000MAY05PE/2002DEC08PE/2005JAN15PE/2007MAR12PE/2007OCT04PE
@REM --                                                         2010JAN05PE
@REM -- !!
 REM -- COPYRIGHT (C) 2000-2007 H.W.PETER, WUPPERTAL .DE --
 REM -- COPYRIGHT (C) 2000-2007 PETER+GEISENDORF GMBH, SPROCKHOEVEL .DE --
 REM -- \\UFN=OK, 2002OCT18PE


 REM 6789.123456789.123456789.123456789.123456789.123456789.123456789.12345
 REM ----------------------------------------------------------------------

SET DIRCMD=

 IF "%1"=="CAT" GOTO CAT
 IF "%1"=="CPY" GOTO CPY
 IF "%1"=="DIR" GOTO DIR
IF "%1"=="DIX" GOTO DIX
 IF "%1"=="DEL" GOTO DEL

IF "%1"=="CD"  GOTO CWD
IF "%1"=="CWD" GOTO CWD

IF "%1"=="VER" GOTO VER
 IF "%1"=="WHO" GOTO VER

 IF "%1"=="XXX" GOTO XXX
IF "%1"=="XYZ" GOTO XXX

 IF "%1"=="ADX" GOTO ADX
IF "%1"=="WRD" GOTO ADX

 IF "%1"=="SFX" GOTO SFX
 IF "%1"=="ZIX" GOTO ZIX

IF "%1"=="ZIP" GOTO ZPA
IF "%1"=="ZPA" GOTO ZPA
IF "%1"=="UNZ" GOTO ZPX
IF "%1"=="ZPX" GOTO ZPX

IF "%1"=="HS4" GOTO HSC
 IF "%1"=="HSC" GOTO HSC

 IF "%1"=="W00" GOTO W00
IF "%1"=="W10" GOTO W10
IF "%1"=="W20" GOTO W20
IF "%1"=="W21" GOTO W21

IF "%1"=="MAN" GOTO MAN
IF "%1"=="MA2" GOTO MA2
IF "%1"=="MA3" GOTO MA3
IF "%1"=="HTM" GOTO INT
 IF "%1"=="INT" GOTO INT
IF "%1"=="XNT" GOTO INT

 IF "%1"=="HTA" GOTO HTA
IF "%1"=="HTX" GOTO HTX

 IF "%1"=="IGD" GOTO IGX
 IF "%1"=="IGT" GOTO IGX
 IF "%1"=="IAD" GOTO IAX
 IF "%1"=="IAT" GOTO IAX

IF "%1"=="FTP" GOTO FTX
IF "%1"=="FTX" GOTO FTX

 IF "%1"=="OQX" GOTO OQX
IF "%1"=="OQH" GOTO OQX

IF "%1"=="END" GOTO RET
IF "%1"=="RET" GOTO RET

ECHO ----------------------------------------------------------
ECHO %0:
ECHO INVALID CONTEXT CALL
ECHO UNGUELTIGER AUFRUF
ECHO ----------------------------------------------------------
ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
PAUSE
GOTO ENDUP

REM 
REM -- H2XCOM.BAT - miscellaneous thread inline services --

:CAT
rem -- %0=H2XCOM CAT %2=src1 %3=src2 %4=dest.fileID (%5=*) --
REM -- note: C:\"Programme"\.. (quotes) not accepted in W2K.IFEXIST
IF     "%4"==""  GOTO CATEND
IF     EXIST %4  DEL %4
IF NOT EXIST %3  GOTO CATEND
IF NOT EXIST %2  GOTO CATEND
COPY   /B    %2+%3   %4   /V >NUL:
IF     "%5"=="*" DEL %3
:CATEND
EXIT

:CPY
rem -- %0=H2XCOM CPY %2=src.fileID %3=dest.fileID (%4=*) --
IF     "%3"==""  GOTO CPYEND
IF     EXIST %3  DEL %3
IF NOT EXIST %2  GOTO CPYEND
COPY   /B    %2      %3   /V >NUL:
IF     "%4"=="*" DEL %2
:CPYEND
EXIT


:DIR
rem -- %0=H2XCOM DIR %2=src.fileID %3=report.fileID --
IF     EXIST %3  DEL %3
IF NOT EXIST %2  GOTO DIREND
DIR %2|SORT> %3
:DIREND
EXIT

:DIX
rem -- %0=H2XCOM DIX %2=src.fileID %3=report.fileID --
IF NOT EXIST %2  GOTO DIXEND
DIR %2|SORT>>%3
:DIXEND
EXIT


:DEL
rem -- %0=H2XCOM DEL %2=fileID --
IF NOT EXIST %2  GOTO DELEND
DEL %2
:DELEND
EXIT

REM 
REM -- H2XCOM.BAT - VER/WHO environment composition --

:CWD
rem -- %0=H2XCOM %1=CWD/CD  %2=report.fileID --
rem -- for thread inline exec only, see EXIT at VEREND --

IF "%2"=="" GOTO CWDEND
CD           > %2
:CWDEND
EXIT

:VER
rem -- %0=H2XCOM %1=VER/WHO %2=report.fileID --
rem -- for thread inline exec only, see EXIT at VEREND --

IF "%2"=="" GOTO VEREND
ECHO [LOC]   > %2
CD          >> %2
ECHO [SVE]  >> %2
IF NOT EXIST   \TAPE\PGOGEN*.*  GOTO VER020
ECHO CJTAPE >> %2
:VER020
IF NOT EXIST \PGORMD\PGOGEN*.*  GOTO VER040
ECHO PGORMD >> %2
FOR %%A IN  (\PGORMD\PGOGEN*.*) DO TYPE %%A >> %2
:VER040
ECHO [VER]  >> %2
VER         >> %2
ECHO [ENV]  >> %2
SET         >> %2
:VEREND
EXIT


 REM 6789.123456789.123456789.123456789.123456789.123456789.123456789.12345
 REM ----------------------------------------------------------------------

:XXX
 rem -- %0=H2XCOM %1=XXX/XYZ --
 rem -- for A:PGOGEN/PGSETUP.BAT termination --

ECHO ...RETURN
PAUSE >NUL:
EXIT
 rem -- MS DOS may misunderstand/ignore EXIT and fall thru 2006FEB20PE
GOTO ENDUP

REM 
REM -- H2XCOM.BAT - MS WORD link --

:ADX
:WRD
rem -- %0=H2XCOM %1=ADX/WRD %2=PC8T*.DOC file id --
IF NOT EXIST %2  GOTO ADXEND

rem -- create valid directory entry for data export --
IF     EXIST C:\PGEXPORT\*.*   GOTO ADX2
IF     EXIST C:\PGEXPORT\NUL   GOTO ADX2
IF     EXIST C:\PGEXPORT\NUL:  GOTO ADX2
MD           C:\PGEXPORT
:ADX2
CLS

rem -- post file(s) to transfer --
:ADX4
IF     EXIST C:\PGEXPORT\PC8ADR.DOC DEL C:\PGEXPORT\PC8ADR.DOC
COPY /B  %2  C:\PGEXPORT\PC8ADR.DOC        >NUL:
DEL %2


:ADX6
rem -- try to start text file processing --
IF     EXIST "%windir%\Startmenü\Programme\Microsoft Word.lnk"  GOTO ADX6W9X
IF     EXIST "%windir%\Profiles\All Users\Startmenü\Programme\Microsoft Word.lnk"  GOTO ADX6WNT
IF     EXIST "%ALLUSERSPROFILES%\Startmenü\Programme\Microsoft Word.lnk"  GOTO ADX6W2K
GOTO ADX68

:ADX6W9X
START        "%windir%\Startmenü\Programme\Microsoft Word.lnk"
GOTO OQX68
:ADX6WNT
START        "%windir%\Profiles\All Users\Startmenü\Programme\Microsoft Word.lnk"
GOTO OQX68
:ADX6W2K
START        "%ALLUSERSPROFILES%\Startmenü\Programme\Microsoft Word.lnk"
GOTO OQX68

:ADX68
GOTO ADXEND


:ADXEND
EXIT

REM 
REM -- A$XCOM.BAT - LHA/ZIP ARCHIVE MGMT

@REM 6789.123456789.123456789.123456789.123456789.123456789.123456789.12345
@REM ----------------------------------------------------------------------

:SFX
 rem -- %0=H2XCOM %1=SFX %2=ts.dirID(!) %3=src.fileID --
 rem -- H2CLAV 28.4 2006APR02PE (SFX)
 rem -- H2CPAV 28.4 2006APR02PE (SFX)
 IF     "%2"==""  GOTO SFXEND
 IF     "%3"==""  GOTO SFXEND

 rem -- create subdir below PGODIR/PGOFFICE, execute SFX there,
 rem -- erase SFX, replace source with SFX production, release subdir
 MD     %2
 FOR %%A IN  (%2\*.*)       DO          DEL %%A
 COPY /B %3   %2\*.EXE
 CD %2
 FOR %%A IN     (*.EXE)     DO              %%A
 FOR %%A IN     (*.EXE)     DO          DEL %%A
 CD ..
 DEL     %3
 COPY /B %2\*.* %3
 FOR %%A IN  (%2\*.*)       DO          DEL %%A
 RD     %2

:SFXEND
EXIT
GOTO ENDXX

REM 
REM -- A$XCOM.BAT - LHA/ZIP ARCHIVE MGMT

@REM 6789.123456789.123456789.123456789.123456789.123456789.123456789.12345
@REM ----------------------------------------------------------------------

:ZIX
 rem -- %0=H2XCOM %1=ZIX %2=ts.dirID(!) %3=src.fileID --
 rem -- H2CLAV 30.0 2006APR02PE (ZIX)
 rem -- H2CPAV 30.0 2006APR02PE (ZIX)
 IF     "%2"==""  GOTO ZIXEND
 IF     "%3"==""  GOTO ZIXEND

 rem -- create subdir below PGODIR/PGOFFICE, execute unzip there,
 rem -- erase source, replace source with unzip production, release subdir
 MD     %2
 FOR %%A IN  (%2\*.*)       DO          DEL %%A
 COPY /B %3   %2\*.Z$
 CD %2
 FOR %%A IN     (*.Z$) DO ..\PGOJRX\bin\java  -jar ..\A$XCOM.JAR -ZIX -PC3 -S:%%A -D:%%A$
 FOR %%A IN     (*.Z$)      DO          DEL %%A
 CD ..
 DEL     %3

 rem -- A$Xxxx should not follow special H2Xxxx conventions
:ZIXPC
 IF     EXIST %2\PC3?????.PGO           GOTO ZIXPC3
:ZIXPC0
        COPY /B %2\*.*            %3            >NUL:
 GOTO ZIXPC9
:ZIXPC3
 ECHO A|COPY /B %2\PC3?????.PGO   PC3?????.PGO  >NUL:
 GOTO ZIXPC9
:ZIXPC9

 FOR %%A IN  (%2\*.*)       DO          DEL %%A
 RD     %2

:ZIXEND
EXIT
GOTO ENDXX

REM 
REM -- H2XCOM.BAT - LHA/ZIP ARCHIVE MGMT


:ZPA
rem -- %0=H2XCOM %1=ZIP/ZPA %2=archive.fileID(!) %3=src.fileID --
IF     "%2"==""  GOTO ZPAEND
IF     "%3"==""  GOTO ZPAEND
H2XZPA.EXE  -jS  %2  %3  >NUL:
:ZPAEND
EXIT


:ZPX
rem -- %0=H2XCOM %1=UNZ/ZPX %2=archive.fileID(!) %3=src.fileID --
IF     "%2"==""  GOTO ZPXEND
IF     "%3"==""  GOTO ZPXEND
H2XZPX.EXE  -oj  %2  %3  >NUL:
:ZPXEND
EXIT


REM 
REM -- H2XCOM.BAT - HSC import scanner data via COM1:/COM2:

:HSC
 rem -- %0=H2XCOM %1=HS4/HSS -- *%2=homedisk *%3=homepath --
 rem -- %2=HS4who.TXT destin file id --
 rem -- %3 source COM line# (1/2) --
 rem -- H2VVOR 30.0 2007FEB25PE
@REM ----------------------------------------------------------------------
@REM    2010JAN05PE
@REM    This batch file may be subject to change without  further notice.
@REM    Do NOT change this logic directly, but
@REM    provide C:\PGHS4PRX\SCANREAD.BAT for continuation as necessary,
@REM    obtaining the destination file name needed in the PGOFFICE folder,
@REM    and a hint to the import COM port (1 or 2) or procedure selected.
@REM ----------------------------------------------------------------------

:HSC2
 IF NOT EXIST   C:\PGHS4PRX\*.*             GOTO HSC4
 IF NOT EXIST   C:\PGHS4PRX\SCANREAD.BAT    GOTO HSC4
                C:\PGHS4PRX\SCANREAD.BAT    %2,%3
:HSC4
 rem --         C:\PGHS4PRX\232_read.exe    PGHS4000.TXT,2
                C:\PGHS4PRX\232_read.exe    %2,%3
:HSCEND
EXIT

REM 
REM -- H2XCOM.BAT - WNT/W95 environment composition --

:W00
:W10
:W20
:W21
rem -- %0=H2XCOM %1=W00/Wnn %2=H2Xxxx.bat %3..=parmlist --
rem -- for thread inline exec only, see EXIT at W00END --

rem -- detect MS Windows 2000/XP context --
IF     "%ALLUSERSPROFILE%"==""   GOTO W00W2KX
IF     "%OS%"==""                GOTO W00W2KX
IF     "%HOMEDRIVE%"==""         GOTO W00W2KX
IF     "%HOMEPATH%"==""          GOTO W00W2KX
IF     "%SYSTEMDRIVE%"==""       GOTO W00W2KX
IF     "%SYSTEMROOT%"==""        GOTO W00W2KX
rem IF "%WINDIR%"==""            GOTO W00W2KX
SET PGONETID=W20
SHIFT
CMD /E:32768 /C START /I /MAX H2XW95.BAT  %1 %2 %3 %4 %5 %6 %7 %8 %9
EXIT
:W00W2KX

rem -- detect MS Windows NT context --
IF     "%OS%"==""                GOTO W00WNTX
IF     "%SYSTEMDRIVE%"==""       GOTO W00WNTX
IF     "%SYSTEMROOT%"==""        GOTO W00WNTX
rem IF "%WINDIR%"==""            GOTO W00WNTX
SET PGONETID=W20
SHIFT
CMD /E:32768 /C START /I /MAX H2XW95.BAT  %1 %2 %3 %4 %5 %6 %7 %8 %9
EXIT
:W00WNTX

rem -- detect MS Windows 95/98/ME context --
IF     "%WINBOOTDIR%"==""        GOTO W00W95X
IF     "%WINDIR%"==""            GOTO W00W95X
SET PGONETID=W95
SHIFT
START /MAX /R  H2XW95.PIF  %1 %2 %3 %4 %5 %6 %7 %8 %9
EXIT
:W00W95X

ECHO ----------------------------------------------------------
ECHO %0:
ECHO UNABLE TO PROCESS MS WINDOWS CONTEXT CALL
ECHO UNGUELTIGER AUFRUF OHNE MS WINDOWS UMGEBUNG
ECHO ----------------------------------------------------------
ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
PAUSE
:W00END
EXIT

REM 
REM -- H2XCOM.BAT - MAN internet manual linkage service to start HTML file --

:MAN
rem -- %0=H2XCOM %1=MAN/HLP %2=homedisk %3=homepath %4=xxx.HTM file id --

rem -- check existance of (new) import/download file(s) --
SET PGOEPCDI=C:
SET PGOEPCDJ=\PGODIR
IF NOT EXIST %PGOEPCDI%%PGOEPCDJ%\DEH*.PGO  GOTO MAN11
FOR %%A IN  (%PGOEPCDI%%PGOEPCDJ%\DEH*.PGO) DO   %0 MA2 %2 %3 %4   %%A
EXIT
:MAN11
SET PGOEPCDI=%2
SET PGOEPCDJ=%3
IF NOT EXIST %PGOEPCDI%%PGOEPCDJ%\DEH*.PGO  GOTO MAN12
FOR %%A IN  (%PGOEPCDI%%PGOEPCDJ%\DEH*.PGO) DO   %0 MA2 %2 %3 %4   %%A
EXIT
:MAN12
rem -- if no (more) download files to be processed, perform INT function --
%0 INT %2 %3 %4

rem -- local inline services for MAN function request --
:MA2
ECHO - preparing manual %5 -
IF     EXIST DEH*.        DEL      DEH*.
COPY   /B %5 DEH?.    /V >NUL:
   DEL    %5
FOR %%B IN  (DEH?)                          DO   %0 MA3 %2 %3 %4 %5  %%B
EXIT
:MA3
ECHO - editing manual %5 -
FOR %%C IN  (%6*.*)                         DO   IF NOT "%%C"=="%6"  DEL %%C
COPY /B   %6 %6.EXE   /V >NUL:
   DEL    %6
             %6.EXE
   DEL       %6.EXE
IF     EXIST %6.BAT      CALL %6*.BAT
IF     EXIST %6.BAT       DEL %6*.BAT
rem -- repeat for more manual source file(s), if any --
GOTO MAN



REM -- H2XCOM.BAT - INT internet linkage service to start HTML file --

:INT
rem -- %0=H2XCOM %1=HTM/INT/XNT %2=homedisk %3=homepath %4=xxx.HTM file id --

rem -- try to start HTML file processing --
IF     EXIST %4  GOTO INT60
GOTO INT68

:INT60
START  %4
:INT68
rem -- CD \
GOTO INTEND

:INTEND
GOTO ENDUP

REM 
REM -- H2XCOM.BAT - HTA/HTX test interface 2004MAR15PE --

:HTA
rem -- %0=H2XCOM HTA %2=src.fileID (%3=dest.directory) --
IF NOT EXIST %2      GOTO HTAEND
IF     "%3"==""      GOTO HTA2
IF     EXIST %3%2     DEL %3%2
COPY   /B    %2           %3%2   /V >NUL:
:HTA2
%0 W00 %0 HTX %2 %3
:HTAEND
EXIT

:HTX
rem -- %0=H2XCOM HTX %2=src.fileID (%3=dest.directory) --
IF     "%3"==""      GOTO HTX2
CD %3
:HTX2
IF NOT EXIST %2      GOTO HTXEND
START %2
:HTXEND
EXIT

REM 
REM -- H2XCOM.BAT - IGD/IGT export internet presentation PCIG????.* --

:IGX
rem -- %0=H2XCOM %1=IGD/IGT %2=homedisk %3=homepath %4=PCIG*.* file id --
rem --           %1=IGD for export and local viewing to check/verify --
rem --           %1=IGT for export and FTP upload from local machine --

rem -- create valid directory entry for data export --
IF     EXIST C:\PGEXPORT\*.*   GOTO IGX2
IF     EXIST C:\PGEXPORT\NUL   GOTO IGX2
IF     EXIST C:\PGEXPORT\NUL:  GOTO IGX2
MD           C:\PGEXPORT
:IGX2
CLS

rem -- post file(s) to transfer --
:IGX4
IF     EXIST PCIG????.*        GOTO IGX42
IF     EXIST PCJG????.*        GOTO IGX42
ECHO -------------------------------------------------
ECHO %0 - Internet Fahrzeug-Ausstellung:
ECHO --
ECHO -- HINWEIS: 
ECHO -- Es stehen keine NEUEN Daten-Bestaende
ECHO -- fuer die Internet-Praesentation zur Verfuegung.
ECHO --                                      ...RETURN
PAUSE >NUL:
GOTO IGX46

:IGX42
IF     EXIST C:\PGEXPORT\PCIG????.*        DEL C:\PGEXPORT\PCIG????.*
IF     EXIST C:\PGEXPORT\PCJG????.*        DEL C:\PGEXPORT\PCJG????.*
FOR %%A IN  (PCIG????.*)        DO COPY /B %%A C:\PGEXPORT\*.* >NUL:
FOR %%A IN  (PCJG????.*)        DO COPY /B %%A C:\PGEXPORT\*.* >NUL:
IF     EXIST PCIG0000.BAT    CALL PCIG0000.BAT C:\PGEXPORT
IF     EXIST PCJG0000.BAT    CALL PCJG0000.BAT C:\PGEXPORT

rem -- for compatibility with old entry file PCIG0000.HTM -23:0/2003FEB19PE-
IF NOT EXIST C:\PGEXPORT\PCJG0000.HTM      GOTO IGX428
IF     EXIST C:\PGEXPORT\PCIG0000.HTM      DEL C:\PGEXPORT\PCIG0000.HTM
COPY /B      C:\PGEXPORT\PCJG0000.HTM          C:\PGEXPORT\PCIG0000.HTM
:IGX428
GOTO IGX46

:IGX46
DIR          C:\PGEXPORT\PC?G????.*
ECHO -------------------------------------------------
ECHO %0 - Internet Fahrzeug-Ausstellung:
ECHO --
ECHO -- Die hierzu benoetigte(n) Datei(en) finden Sie
ECHO -- auf diesem Computer im Verzeichnis C:\PGEXPORT
ECHO -- unter den Namen PC?G????.* bereitgestellt

rem -- try to start HTML file processing, or FTP upload --
:IGX6
IF "%1"=="IGD"  GOTO IGX64
IF "%1"=="IGT"  GOTO IGX66
GOTO IGX68

:IGX64
rem -- try to start HTML file processing --
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:
IF     EXIST C:\PGEXPORT\PCIG0000.HTM  GOTO IGX64I
IF     EXIST C:\PGEXPORT\PCJG0000.HTM  GOTO IGX64J
GOTO IGX68
:IGX64I
START        C:\PGEXPORT\PCIG0000.HTM
GOTO IGX68
:IGX64J
START        C:\PGEXPORT\PCJG0000.HTM
GOTO IGX68

:IGX66
rem -- try to start FTP upload --
ECHO --
ECHO -- Starten/Oeffnen Sie bitte jetzt ggf.
ECHO -- Ihre Internet-Verbindung.
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:
IF     EXIST C:\PGEXPORT\PCIG0000.FTP  GOTO IGX66I
IF     EXIST C:\PGEXPORT\PCJG0000.FTP  GOTO IGX66J
GOTO IGX68
:IGX66I
H2XCOM.BAT W00  H2XCOM.BAT FTX %2 %3 C: \PGEXPORT PCIG0000.FTP
GOTO IGX68
:IGX66J
H2XCOM.BAT W00  H2XCOM.BAT FTX %2 %3 C: \PGEXPORT PCJG0000.FTP
GOTO IGX68

:IGX68
rem -- CD \
GOTO IGXEND

:IGXEND
GOTO ENDUP

REM 
REM -- H2XCOM.BAT - IAD/IAT export - internet ftp upload PCJA????.* --

:IAX
rem -- %0=H2XCOM %1=IAD/IAT %2=homedisk %3=homepath %4=PCJA????.* file id --
rem --           %1=IAD for export and local viewing to check/verify --
rem --           %1=IAT for export and FTP upload from local machine --

rem -- create valid directory entry for data export --
IF     EXIST C:\PGEXPORT\*.*   GOTO IAX2
IF     EXIST C:\PGEXPORT\NUL   GOTO IAX2
IF     EXIST C:\PGEXPORT\NUL:  GOTO IAX2
MD           C:\PGEXPORT
:IAX2
CLS

rem -- post file(s) to transfer --
:IAX4
IF     EXIST PCJA????.*        GOTO IAX42
ECHO -------------------------------------------------
ECHO %0 - Internet ftp upload:
ECHO --
ECHO -- HINWEIS: 
ECHO -- Es stehen keine NEUEN Daten-Bestaende %4
ECHO -- fuer die Internet-Praesentation zur Verfuegung.
ECHO --                                      ...RETURN
PAUSE >NUL:
GOTO IAX46

:IAX42
IF     EXIST C:\PGEXPORT\PCJA????.*        DEL C:\PGEXPORT\PCJA????.*
FOR %%A IN  (PCJA????.*)        DO COPY /B %%A C:\PGEXPORT\*.* >NUL:
IF     EXIST PCJA0000.BAT    CALL PCJA0000.BAT C:\PGEXPORT
GOTO IAX46

:IAX46
DIR          C:\PGEXPORT\PCJA????.*
ECHO -------------------------------------------------
ECHO %0 - Internet ftp upload:
ECHO --
ECHO -- Die hierzu benoetigte(n) Datei(en) finden Sie
ECHO -- auf diesem Computer im Verzeichnis C:\PGEXPORT
ECHO -- unter den Namen %4 bereitgestellt
ECHO --

rem -- try to start HTML file processing, or FTP upload --
:IAX6
IF "%1"=="IAD"  GOTO IAX64
IF "%1"=="IAT"  GOTO IAX66
GOTO IAX68

:IAX64
rem -- try to start HTML file processing --
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:
IF NOT EXIST C:\PGEXPORT\PCJA0000.HTM  GOTO IGX68
START        C:\PGEXPORT\PCJA0000.HTM
GOTO IGX68

:IAX66
rem -- try to start FTP upload --
ECHO --
ECHO -- Starten/Oeffnen Sie bitte jetzt ggf.
ECHO -- Ihre Internet-Verbindung.
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:
IF NOT EXIST C:\PGEXPORT\PCJA0000.FTP  GOTO IGX68
H2XCOM.BAT W00  H2XCOM.BAT FTX %2 %3 C: \PGEXPORT PCJA0000.FTP
GOTO IGX68

:IAX68
GOTO IAXEND

:IAXEND
GOTO ENDUP

REM 
REM -- H2XCOM.BAT - execute FTP with C:\PGEXPORT context --

:FTX
rem -- %0=H2XCOM %1=FTP/FTX %2=homedisk %3=homepath
rem --                      %4=senddisk %5=sendpath %6=script file id --
rem -- ECHO %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
%4
CD \
CD %5

rem -- test -- ((
rem -- TYPE   %6
rem -- test -- ))

rem -- prax -- ((
       FTP -s:%6
rem -- prax -- ))

       DEL    %6
CD \
ECHO -------------------------------------------------
ECHO %0 - Internet ftp upload:
ECHO --
ECHO -- Die Internet-Verbindung wird nun fuer
ECHO -- ftp upload nicht mehr benoetigt.
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:
rem -- do NOT return to home path and directory --
EXIT


REM 
REM -- H2XCOM.BAT - OQX any order queue transfer via internet HTML --

:OQX
rem -- %0=H2XCOM %1=OQX/OQH %2=homedisk %3=homepath %4=OQ*.HTM file id --

rem -- create valid directory entry for data export --
IF     EXIST C:\PGEXPORT\*.*   GOTO OQX2
IF     EXIST C:\PGEXPORT\NUL   GOTO OQX2
IF     EXIST C:\PGEXPORT\NUL:  GOTO OQX2
MD           C:\PGEXPORT
:OQX2
CLS

rem -- post file(s) to transfer --
:OQX4
IF     EXIST OQ*.HTM  GOTO OQX42
ECHO -------------------------------------------------
ECHO -- HINWEIS: 
ECHO -- Es stehen keine NEUEN Order-Bestaende
ECHO -- zur Uebertragung via Internet zur Verfuegung.
ECHO --
GOTO OQX46

:OQX42
IF     EXIST C:\PGEXPORT\OQ*.HTM DEL C:\PGEXPORT\OQ*.HTM
FOR %%A IN  (OQ*.HTM) DO COPY /B %%A C:\PGEXPORT\OQ*.HTM >NUL:
DEL          OQ*.HTM
rem -- no file catenation --
rem -- single file transfer --
GOTO OQX46

:OQX46
DIR          C:\PGEXPORT\OQ*.HTM
ECHO -------------------------------------------------
ECHO %0 - ET-Order:
ECHO --
ECHO -- Die zu uebertragende(n) Datei(en) finden Sie
ECHO -- auf diesem Computer im Verzeichnis C:\PGEXPORT
ECHO -- unter den Namen                        OQ*.HTM
ECHO -- fuer den elektronischen Versand bereitgestellt
ECHO --                                      ...RETURN
ECHO -------------------------------------------------
PAUSE >NUL:

rem -- try to start HTML file processing --
IF     EXIST C:\PGEXPORT\OQ$INDEX.HTM  GOTO OQX60
GOTO OQX68
:OQX60
START        C:\PGEXPORT\OQ$INDEX.HTM
GOTO OQX68
:OQX68
rem -- CD \
GOTO OQXEND

:OQXEND
GOTO ENDUP

REM 
REM -- H2XCOM.BAT - FINAL --

:RET
rem -- %0=H2XCOM END/RET %2=homedisk %3=homepath to return to --
rem -- to serve as common termination for similar batch files --




:ENDUP
SET PGOEPCPI=
SET PGOEPCDI=
SET PGOEPCDJ=

REM -- now return to PGO home drive and resume PGO mainline --
rem -- %2
rem -- CD \
rem -- CD %3
SET  PGOEPCPI=PGOBEG
IF "%PGONETID%"=="W10" SET PGOEPCPI=START /R /MAX PGOFFICE.PIF
IF "%PGONETID%"=="W16" SET PGOEPCPI=START /R /MAX PGOFFICE.PIF
IF "%PGONETID%"=="W95" SET PGOEPCPI=START /R /MAX PGOFFICE.PIF
IF "%PGOEPCEX%"=="END" SET PGOEPCPI=
%PGOEPCPI%

:ENDXX
EXIT
