So I have this subroutine that I want to call from another location in a batch file. The functions work as desired, but for some reason I cant pin down, the prompt wants to have the user enter something TWICE, before it will accept anything.
Say, if I enter "0", to go back to a previous menu, it takes me right back to the prompt, and I have to enter "0" again before it will actually go back to the previous menu (elsewhere in my main script).
I can, say, enter "w" (or any other value), then the second time, enter the one I actually WANT to use, and it will finally do it.
This is driving me nuts.
:subfullbackup
cls
if exist "%current%\Backup\Full_Backup" (
  Echo  Backup folder already exists
  Echo.
  Echo  [o]  Overwrite local device files with existing local files
  Echo  [w]  Wipe current local backup and start fresh
  Echo.
  set /p choice=Select: 
  if %choice% == o (
    Echo.
    Echo  Depending on how much data you have,
    Echo  this could take a couple hours.
    Echo.
    Echo  Backing up...
    adb pull /sdcard/ "%current%\Backup\Full_Backup" >nul 2>&1
    Echo.
    Echo  -= BACKUP COMPLETE =-
    Pause
    Goto :backup
  )
  if %choice% == w (
    Echo.
    Echo  Removing all current local backup files in 'Full_Backup'
    rmdir /S /Q "%current%\Backup\Full_Backup" >nul 2>&1
    Echo.
    Echo  Depending on how much data you have,
    Echo  this could take a couple hours.
    Echo.
    Echo  Backing up...
    adb pull /sdcard/ "%current%\Backup\Full_Backup" >nul 2>&1
    Echo.
    Echo  -= BACKUP COMPLETE =-
    Pause
    Goto :backup
  )
  if not %choice% == o goto subfullbackup
  if not %choice% == w goto subfullbackup
) else (
    Echo.
    Echo  Depending on how much data you have,
    Echo  this could take a couple hours.
    Echo.
    Echo  Backing up...
    adb pull /sdcard/ "%current%\Backup\Full_Backup" >nul 2>&1
    Echo.
    Echo  -= BACKUP COMPLETE =-
    Pause
    Goto :backup
)
Goto :eof