Stephen Roesner
asked on
Dos Bat File
I dont understand why this is not working?
Section :MM is working
The userinp is working and grabs A1
"%USERNAME%" == "xxxxxx" is working
but line 29 does not go to CT
it goes to line 35 to TB the first group
what am I missing - LOL its driving me crazy
@echo off
:MM
cls
echo Select the Database to Download
echo ----------------------
echo 1 BEQ
echo 2 TRR
echo 3 AUDIT
echo 4 COMM AUDIT
echo 5 COB
echo 6 FEF
echo 7 LISLEP
echo 8 BEQ HS
echo 9 PDE
echo 10 MASTER
echo --------------------
echo E Exit this menu
set /p userinp=User Input:
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto A1
if "%userinp%"=="2" goto A2
if "%userinp%"=="3" goto A3
if "%userinp%"=="E" goto A0
echo Invalid Choice
:A1
if "%USERNAME%" == "xxxxxx" goTo CT
if "%USERNAME%" == "yyyyyy" goto TB
if "%USERNAME%" == "zzzzzz" goto BW
echo Downloading BEQ .....
:TB
DEL "C:\ERPDP\BEQ\TSO-BEQ DatabaseTB.zip"
COPY "\\PYWNAP001\Senior_Seg\ER PDP_Operat ions\Datab ases\BEQ\T SO-BEQ DatabaseTB.zip" "C:\ERPDP\BEQ"
Pause
goto MM
:BW
DEL "C:\ERPDP\BEQ\TSO-BEQ DatabaseBW.zip"
COPY "\\PYWNAP001\Senior_Seg\ER PDP_Operat ions\Datab ases\BEQ\T SO-BEQ DatabaseBW.zip" "C:\ERPDP\BEQ"
goto MM
:CT
DEL "C:\ERPDP\BEQ\TSO-BEQ Database.mdb"
COPY "\\PYWNAP001\Senior_Seg\ER PDP_Operat ions\Datab ases\BEQ\T SO-BEQ Database.mdb" "C:\ERPDP\BEQ"
goto MM
:A0
echo Exitting, Have a Good Day ........
Section :MM is working
The userinp is working and grabs A1
"%USERNAME%" == "xxxxxx" is working
but line 29 does not go to CT
it goes to line 35 to TB the first group
what am I missing - LOL its driving me crazy
@echo off
:MM
cls
echo Select the Database to Download
echo ----------------------
echo 1 BEQ
echo 2 TRR
echo 3 AUDIT
echo 4 COMM AUDIT
echo 5 COB
echo 6 FEF
echo 7 LISLEP
echo 8 BEQ HS
echo 9 PDE
echo 10 MASTER
echo --------------------
echo E Exit this menu
set /p userinp=User Input:
set userinp=%userinp:~0,1%
if "%userinp%"=="1" goto A1
if "%userinp%"=="2" goto A2
if "%userinp%"=="3" goto A3
if "%userinp%"=="E" goto A0
echo Invalid Choice
:A1
if "%USERNAME%" == "xxxxxx" goTo CT
if "%USERNAME%" == "yyyyyy" goto TB
if "%USERNAME%" == "zzzzzz" goto BW
echo Downloading BEQ .....
:TB
DEL "C:\ERPDP\BEQ\TSO-BEQ DatabaseTB.zip"
COPY "\\PYWNAP001\Senior_Seg\ER
Pause
goto MM
:BW
DEL "C:\ERPDP\BEQ\TSO-BEQ DatabaseBW.zip"
COPY "\\PYWNAP001\Senior_Seg\ER
goto MM
:CT
DEL "C:\ERPDP\BEQ\TSO-BEQ Database.mdb"
COPY "\\PYWNAP001\Senior_Seg\ER
goto MM
:A0
echo Exitting, Have a Good Day ........
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Good catch i was using a small c instead of a cap C it now works I didn't realize dos was case sensitive
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for Grizbear51's comment #a39236021
for the following reason:
Good catch i was using a small c instead of a cap C it now works I didn't realize dos was case sensitive
Accepted answer: 0 points for Grizbear51's comment #a39236021
for the following reason:
Good catch i was using a small c instead of a cap C it now works I didn't realize dos was case sensitive
ASKER
Good catch i was using a small c instead of a cap C it now works I didn't realize dos was case sensitive
:A1
echo "%USERNAME%"
if "%USERNAME%" == "xxxxxx" goTo CT
if "%USERNAME%" == "yyyyyy" goto TB
if "%USERNAME%" == "zzzzzz" goto BW
...just to be sure.