Search found 12 matches

by RCP
19 Sep 2013 05:05
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

Penpen, now it makes sense to me why this all happen. Now you were thinking excelent! In your first link I was there in the past and downloaded the 2.0 version. I was thinking because the FreeDOS version was 1.1 and the higher versions of choise were maybe not made for 1.1. I used the 1.1 version fr...
by RCP
18 Sep 2013 16:57
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

Ahhh... i've read too fast without thinking... you are right, choice.exe was found and executed successfully. So sorry about that... forget my mumble about the autoexec.bat in my above post. Btw: The code from foxidrive and Aacini both are working under FreeDos 1.0, too (just tested). penpen Edit: ...
by RCP
18 Sep 2013 16:49
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

But there is no error message penpen. The prompt appears too - choice.exe could be in the root of the drive. U R right Choice is working. I made the USb stick with the perfect tool Rufus. With this tool you can make a USB stick directly bootable with FreeDOS 1.1. I also tried FreeDOS image from Fre...
by RCP
18 Sep 2013 04:57
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

@Aacini: I tried your code also but doesn't work.
As you can see in the picture, when I press 1 it goes directly to exit.
When I press 2 it start with 1. Why should FreeDOS first wants to execute the exit and then starts with 1,2,3,etc... ?

Image
by RCP
18 Sep 2013 04:46
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

Test this - it works here with the FreeDOS choice.exe This is the same structure as your code - there is something else happening there... @echo off choice /C:12345678 /N Choose a option... if errorlevel 8 goto end if errorlevel 7 goto 7 if errorlevel 6 goto 6 if errorlevel 5 goto 5 if errorlevel 4...
by RCP
18 Sep 2013 04:38
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

@Antonio The %errorlevel% variable is Windows NT (cmd.exe) specific and unfortunately not available under DOS. @RCP Your code looks right. I'm not familiar with FreeDOS but perhaps you should try to rename the labels to a, b, c ... or whatever. Maybe it doesn't work with numeric names (only a guess...
by RCP
16 Sep 2013 04:43
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

foxidrive wrote:I realise now that you're not using a cmd window.

Put a pause after the choice line. See if it gives you an error.


That's correct :wink:
I use FreeDOS as mentioned in the first post.
I already used a pause function to see what happened.
When you choose option one it goes to option 7.
by RCP
16 Sep 2013 04:01
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

I also tried aacini's original version. If I push option 8,7 or 6 it keeps going to label :7 choice /C:12345678 Maak je keuze... if errorlevel 8 goto exit if not errorlevel 1 goto exit goto 8 if errorlevel 7 goto exit if not errorlevel 1 goto exit goto 7 if errorlevel 6 goto exit if not errorlevel 1...
by RCP
16 Sep 2013 03:18
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

choice /C:12345678 /N Choose a option... if errorlevel 8 goto exit if not errorlevel 1 goto exit goto %errorlevel% :7 . . . . I am not very familiar with batch files. Tried your solution as you can see in the code beneath. Did I implemented it OK? Now I get the error: bad command or filename - &quo...
by RCP
16 Sep 2013 02:52
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

@foxidrive: Thanks for your reply.
Tried your pause and :eof but I get the message batchfile c:\autoexec,bat does not contain label of "eof".
I think I should make such a label but for what?
by RCP
16 Sep 2013 02:40
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Re: Not the right command with the right option (errorlevel)

@bars143: Hi, I respect that you also have a problem and want it, just like me, be solved. But it is not really properly to post your question in another one's post. In this way the thread is getting messy with answers/questions from/for me and/or you and it's not gonna read clearly. Could you pleas...
by RCP
15 Sep 2013 15:52
Forum: DOS Batch Forum
Topic: Not the right command with the right option (errorlevel)
Replies: 26
Views: 24129

Not the right command with the right option (errorlevel)

Hi people, I just created a batch file under FreeDOS to automate a Ghost image creation. But it has a strange behaviour: If you press a number, the errorlevel does not go to the right number. So if I type nr. 1 it should make a ghost image on HD (:1) but instead it starts ghost (:7) echo ÉÍÍÍÍÍÍÍÍÍÍ...