memory carte

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Habib
Posts: 2
Joined: 26 Oct 2020 05:07

memory carte

#1 Post by Habib » 26 Oct 2020 05:18

Hi everybody
I am traying to creat a batch with it we learn english vocabulary . I have put en Batch on attachements if you can see it , and tell me where is the errors .
thank you so much
Attachments
batch test.txt
(894 Bytes) Downloaded 279 times

Compo
Posts: 600
Joined: 21 Mar 2014 08:50

Re: memory carte

#2 Post by Compo » 26 Oct 2020 20:21

Perhaps something like this will assist you

Code: Select all

@Echo Off
SetLocal EnableExtensions DisableDelayedExpansion

Set "Reponse="

For %%G In (
	"pomme=apple"
	"porte=door"
	"bras=arm"
	"voiture=car"
) Do For /F "Tokens=1,* Delims==" %%H In (%%G) Do (
	SetLocal EnableDelayedExpansion
	Set /P "Reponse=Quel est le mot anglais pour %%H? "
	If /I Not "!Reponse!"=="%%I" (
		Echo La reponse etait %%I.
	) Else Echo Bravo, vous aviez raison.
	EndLocal
)

Pause

Habib
Posts: 2
Joined: 26 Oct 2020 05:07

Re: memory carte

#3 Post by Habib » 27 Oct 2020 11:51

Hi , yes i tried your batch and it worked
thank you , i am going to learn your batch
much thinks

Post Reply