Having an issue with if-else statements/error handling. Been trying to get this to work, cannot seem to do it. What I'm looking to do is have user input client id, then delete the directory associated with said client if it exists.
Code:
@echo off
set /p id=Enter ID:
rd /s /q "\\Images\Public on Images\DMS Scanned Clients\%id%"
echo \\Images\Public on Images\DMS Scanned Clients\%id%
pause
So user would input 956862 for example. Then if directory at \Images\Public on Images\DMS Scanned Clients\956862 exists, it would be removed, otherwise, message would display stating it does not exist.
Thanks