Computing.Net > Forums > Programming > Parameter format is not correct

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Parameter format is not correct

Reply to Message Icon

Name: thelastrewind
Date: April 7, 2009 at 04:56:12 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: lee123abc
Date: April 7, 2009 at 05:05:02 Pacific
Reply:

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


0

Response Number 2
Name: thelastrewind
Date: April 7, 2009 at 07:29:48 Pacific
Reply:

Thanks for the idea, but that didn't work.


0

Response Number 3
Name: thelastrewind
Date: April 10, 2009 at 07:39:14 Pacific
Reply:

BTW, I needed to put quotes around the "attrib" path, that's what fixed it...


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Parameter format is not correct

How to replace input parameter of batch file www.computing.net/answers/programming/how-to-replace-input-parameter-of-batch-file-/19475.html

C++ 3.0 is not working over XP OS www.computing.net/answers/programming/c-30-is-not-working-over-xp-os/13290.html

input/output file...which is which? www.computing.net/answers/programming/inputoutput-filewhich-is-which/8599.html