@echo.
@echo Remove existing solution and vcproj files ...
@echo Actually it ONLY renames then to .old, if no previous *.old,
@echo or to *.bak, after deleting any previous *.bak file ...
@set TEMP1=slnlist.txt
@if NOT EXIST %TEMP1% goto ERR1
@echo Do you REALLY want to continue? Only 'y' keyin will continue ...
@ask Continue? Y or N :
@if ERRORLEVEL 2 goto NOASK
@if ERRORLEVEL 1 goto DOIT
@echo.
@echo Did not detect a 'y' keyin ... aborting, doing nothing ...
@echo.
@goto END

:DOIT
@echo Proceeding to do deletions ...
@for /F "tokens=1" %%i in (%TEMP1%) do @(call :DODELETE %%i %%~nxi)
@goto END

:DODELETE
@if "%1x" == "x" goto :EOF
@if "%1x" == "fgfs\README.fgfs.txtx" goto :EOF
@if NOT EXIST %1 goto NOWAY
@echo Renaming %1 to %2.old or bak ...
@if EXIST %1.old goto DOBAK
@echo Renaming to OLD
ren %1 %2.old
@goto :EOF

:DOBAK
@echo Renaming to BAK
@if EXIST %1.bak del %1.bak > nul
ren %1 %2.bak
@goto :EOF

:NOWAY
@echo.
@echo WARNING: Can NOT locate file %1 ... Maybe already renamed ...
@echo Perhaps unzip again from vc?sln??.zip to resotre these files, or
@echo run restslnlist.bat to TRY to restore the file ...
@echo.
@pause
@goto :EOF

:ERR1
@echo.
@echo Can NOT locate file %TEMP1% ... check name, location ...
@echo It is in the vc?sln??.zip file ... Did you forget to UNZIP this?
@echo.
@goto END

:NOASK
@echo.
@echo Appears ask.exe is NOT in path ... check name, location ...
@echo You can DOWNLOAD the source, and runtime EXE of my 'ask.exe' from -
@echo http://geoffair.net/ms/ask.htm#downloads
@echo.
@goto END


:END

