1.

Solve : A few questions!?

Answer»

I have a few questions...

1. What is the 'errorlevel'? I.E. if %errorlevel%==0 (

2. What are parenthesis for? I.E if %errorlevel%==0 >>>>>>(<<<<<<

3. What is /i and /m and /n for? I know /p is User input and /a is arithmetic.

4. What is ) else ( used for?

5. What's the code to make a log and where to place it?

Heh, thanks!1. What is the 'errorlevel'? I.E. if %errorlevel%==0 (

if a command or program finished without error, %errorlevel%=0, a nonzero value MEANS there was an error.

2. What are parenthesis for? I.E if %errorlevel%==0 >>>>>>(<<<<<<

For grouping.

3. What is /i and /m and /n for? I know /p is User input and /a is arithmetic.

Don't know what you mean. /i /m /n are not switches for SET.

4. What is ) else ( used for?

It is obvious:

if something==something else (
do this thing
) else (
do that thing
)

5. What's the code to make a log and where to place it?

echo some text >> c:\logs\logfile.txt


You SERIOUSLY NEED to do some reading and studying.

Quote from: Dias de verano on January 09, 2009, 04:33:15 PM

You SERIOUSLY need to do some reading and studying.

Seconded. A lot of info can be found in the documentation (can't remember, think it might have been a SEPARATE download) Quote from: BatchRocks on January 09, 2009, 03:28:25 PM
I have a few questions...

1. What is the 'errorlevel'? I.E. if %errorlevel%==0 (

2. What are parenthesis for? I.E if %errorlevel%==0 >>>>>>(<<<<<<

3. What is /i and /m and /n for? I know /p is User input and /a is arithmetic.

4. What is ) else ( used for?

5. What's the code to make a log and where to place it?

Heh, thanks!

What command would /i or the other switches be associated. What you can do is go to CMD and type
Code: [Select]help %command%It should list all of the switches.I completely forgot about Cmd then help %command% Lol, thanks.

But, I've searched EVERYWHERE and can't find it. Thanks.

EDIT : But wait, then what's grouping made for?grouping? I don't think I have it...He said ( and ) are used for grouping, why'd you use grouping?

Also, this is my batch file.

@Echo off
echo Hi there>> F:\\\Batch Files
pause
exit

and it says 'The system cannot find the specified path location'

Any help?Quote
Code: [Select]F:\\ \Batch Files

The first 2 slashes are unnecessary.
Quote from: BatchRocks
He said ( and ) are used for grouping, why'd you use grouping?

Once again, we tell you....

Quote from: BC_Programmer on January 09, 2009, 04:42:30 PM
Quote from: Dias de verano on January 09, 2009, 04:33:15 PM
You SERIOUSLY need to do some reading and studying.

Seconded. A lot of info can be found in the documentation (can't remember, think it might have been a separate download)


Discussion

No Comment Found