Parameter format is not correct

April 7, 2009 at 04:56:12
Specs: Windows XP
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. Cancel

echo.
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 Data

echo 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 Data

echo 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 Data

echo 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 Data

echo Copy Complete.
@pause
GOTO :exit

:exit
exit


See More: Parameter format is not correct

Report •


#1
April 7, 2009 at 05:05:02
I am guessing here, but try putting "QUOTES" around
set drive=C:\Documents and Settings\All Users\Application Data\ff

Report •

#2
April 7, 2009 at 07:29:48
Thanks for the idea, but that didn't work.

Report •

#3
April 10, 2009 at 07:39:14
BTW, I needed to put quotes around the "attrib" path, that's what fixed it...

Report •

Related Solutions


Ask Question