Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I am very new to batch files and programming in general. I have the following batch file (which I know is not perfect, but it accomplishes what I need it to do, so I'm happy with it). The batch works great, but before it runs, and after it completes each choice, there is a line output that says "Parameter format is not correct -" Other than that, the batch does it's job. Can anyone advise me on why that line is being output?
@echo off
cls
echo 1. CM
echo 2. OM
echo 3. PM
echo 4. PPM
echo 0. Cancelecho.
echo.
SET /P choice=Which set do you want to install?:if "%choice%"=="1" GOTO :cm
if "%choice%"=="2" GOTO :om
if "%choice%"=="3" GOTO :pm
if "%choice%"=="4" GOTO :ppm
if "%choice%"=="0" GOTO :exit:cm
:: variables
attrib -H C:\Documents and Settings\All Users\Application Data
set drive=C:\Documents and Settings\All Users\Application Data\ff
set backupcmd=xcopy /s /h /y
del "%drive%\System" /q
%backupcmd% "E:\Stuff\Mark\cm" "%drive%\System"
attrib +H C:\Documents and Settings\All Users\Application Dataecho Copy Complete.
@pause
GOTO :exit:om
:: variables
attrib -H C:\Documents and Settings\All Users\Application Data
set drive=C:\Documents and Settings\All Users\Application Data\ff
set backupcmd=xcopy /s /h /y
del "%drive%\System" /q
%backupcmd% "E:\Stuff\Mark\om" "%drive%\System"
attrib +H C:\Documents and Settings\All Users\Application Dataecho Copy Complete.
@pause
GOTO :exit:pm
:: variables
attrib -H C:\Documents and Settings\All Users\Application Data
set drive=C:\Documents and Settings\All Users\Application Data\ff
set backupcmd=xcopy /s /h /y
del "%drive%\System" /q
%backupcmd% "E:\Stuff\Mark\pm" "%drive%\System"
attrib +H C:\Documents and Settings\All Users\Application Dataecho Copy Complete.
@pause
GOTO :exit:ppm
:: variables
attrib -H C:\Documents and Settings\All Users\Application Data
set drive=C:\Documents and Settings\All Users\Application Data\ff
set backupcmd=xcopy /s /h /y
del "%drive%\System" /q
%backupcmd% "E:\Stuff\Mark\ppm" "%drive%\System"
attrib +H C:\Documents and Settings\All Users\Application Dataecho Copy Complete.
@pause
GOTO :exit:exit
exit

I am guessing here, but try putting "QUOTES" around
set drive=C:\Documents and Settings\All Users\Application Data\ff

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |