Code:
FOR /F "tokens=1 skip=1 delims=<tab><space>" %%G IN ('adb.exe devices ^|find "device"') DO SET handset=%%G
IF DEFINED %handset% (
GOTO UINPUT
) ELSE (
ECHO HTC Desire not detected!
ECHO Please ensure the following are true:
ECHO - Your HTC Desire is connected via USB
ECHO - You've quit HTC Sync on your computer (Right click icon and exit in task tray)
ECHO - USB Debugging is enabled in the phone's settings
ECHO - USB "Charge Only" mode is selected
ECHO - No applications are trying to mount the SDCard (e.g. DoubleTwist/WinAMP)
)
Getting a syntax error on the above code, I know it's down to the IF DEFINED statement but can't see the issue?
Can you even use the else statement in this example?

Thanks