@ECHO OFF
REM FDGC.BAT - helper for FDGTSTA user-context FLAGDIR tests.
C:
CD \FDGTMP
ECHO FDGC helper started. > C:\FDGTMP\HELPER.TXT
ECHO Running FLAGDIR as NOPASSUSER, then relogging SUPERVISOR. >> C:\FDGTMP\HELPER.TXT

LOGOUT > C:\FDGTMP\D00_LOG.OUT
LOGIN NOPASSUSER > C:\FDGTMP\D01_LGIN.OUT
F:
CD \

ECHO Starting U10 read...
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Normal > NUL
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA > C:\FDGTMP\UNOV\U10_READ.OUT
PUBLIC\FLAGDIR F:\FDGTEST\DIRA > C:\FDGTMP\UPUB\U10_READ.OUT

ECHO Starting U11 Hidden...
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Normal > NUL
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Hidden > C:\FDGTMP\UNOV\U11_HID.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA >> C:\FDGTMP\UNOV\U11_HID.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Normal > NUL
PUBLIC\FLAGDIR F:\FDGTEST\DIRA Hidden > C:\FDGTMP\UPUB\U11_HID.OUT
PUBLIC\FLAGDIR F:\FDGTEST\DIRA >> C:\FDGTMP\UPUB\U11_HID.OUT

ECHO Starting U12 System...
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB Normal > NUL
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB System > C:\FDGTMP\UNOV\U12_SYS.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB >> C:\FDGTMP\UNOV\U12_SYS.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB Normal > NUL
PUBLIC\FLAGDIR F:\FDGTEST\DIRB System > C:\FDGTMP\UPUB\U12_SYS.OUT
PUBLIC\FLAGDIR F:\FDGTEST\DIRB >> C:\FDGTMP\UPUB\U12_SYS.OUT

ECHO Starting U13 Purge...
NPUBLIC\FLAGDIR F:\FDGTEST\DIRC Normal > NUL
NPUBLIC\FLAGDIR F:\FDGTEST\DIRC Purge > C:\FDGTMP\UNOV\U13_PUR.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRC >> C:\FDGTMP\UNOV\U13_PUR.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRC Normal > NUL
PUBLIC\FLAGDIR F:\FDGTEST\DIRC Purge > C:\FDGTMP\UPUB\U13_PUR.OUT
PUBLIC\FLAGDIR F:\FDGTEST\DIRC >> C:\FDGTMP\UPUB\U13_PUR.OUT

ECHO Starting U14 Delete/Rename inhibit...
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB\SUB Normal > NUL
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB\SUB Deleteinhibit Renameinhibit > C:\FDGTMP\UNOV\U14_DIRI.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB\SUB >> C:\FDGTMP\UNOV\U14_DIRI.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRB\SUB Normal > NUL
PUBLIC\FLAGDIR F:\FDGTEST\DIRB\SUB Deleteinhibit Renameinhibit > C:\FDGTMP\UPUB\U14_DIRI.OUT
PUBLIC\FLAGDIR F:\FDGTEST\DIRB\SUB >> C:\FDGTMP\UPUB\U14_DIRI.OUT

ECHO Starting U15 Normal reset...
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Hidden System > NUL
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Normal > C:\FDGTMP\UNOV\U15_NORM.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA >> C:\FDGTMP\UNOV\U15_NORM.OUT
NPUBLIC\FLAGDIR F:\FDGTEST\DIRA Hidden System > NUL
PUBLIC\FLAGDIR F:\FDGTEST\DIRA Normal > C:\FDGTMP\UPUB\U15_NORM.OUT
PUBLIC\FLAGDIR F:\FDGTEST\DIRA >> C:\FDGTMP\UPUB\U15_NORM.OUT

ECHO Starting U90 missing...
NPUBLIC\FLAGDIR F:\FDGTEST\MISSING > C:\FDGTMP\UNOV\U90_MISS.OUT
PUBLIC\FLAGDIR F:\FDGTEST\MISSING > C:\FDGTMP\UPUB\U90_MISS.OUT

LOGOUT > C:\FDGTMP\D02_LGOT.OUT
F:
CD \
IF EXIST \LOGIN\LOGIN.EXE GOTO HAVELOGIN
ECHO F:\LOGIN\LOGIN.EXE not found. >> C:\FDGTMP\HELPER.TXT
GOTO END
:HAVELOGIN
F:\LOGIN\LOGIN SUPERVISOR /PWD:%LGNTPWD% > C:\FDGTMP\D03_LGSU.OUT
F:
CD \
IF EXIST \FDGTSTA.BAT GOTO QUEUEP2
ECHO F: not restored or FDGTSTA missing. >> C:\FDGTMP\HELPER.TXT
GOTO END
:QUEUEP2
C:
CD \FDGTMP
DLYSTRT /T:2 F:\FDGTSTA.BAT PART2 > C:\FDGTMP\D04_P2.OUT
:END
