Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1482 connectés 

  FORUM HardWare.fr
  Programmation
  Shell/Batch

  [DOS] ligne de commande

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

[DOS] ligne de commande

n°669862
snow_93
P@iC CitroN
Posté le 10-03-2004 à 16:17:42  profilanswer
 

c encore moi :D
comment faire un "scanf" sous dos.
je voudai avoir un .bat avec:
 
echo option 1
echo option 2
echo option 3

 
l'utilisateur tape 2 par exemple et la je fait un goto...
sauf que je c pas comment récupérer le 2...
 
merci  :hello:

mood
Publicité
Posté le 10-03-2004 à 16:17:42  profilanswer
 

n°669885
djobidjoba
Posté le 10-03-2004 à 16:37:20  profilanswer
 
n°670411
snow_93
P@iC CitroN
Posté le 10-03-2004 à 23:26:12  profilanswer
 

j'arrive pas à utiliser set :(

n°670537
snow_93
P@iC CitroN
Posté le 11-03-2004 à 09:45:27  profilanswer
 

:hot:

n°670576
djobidjoba
Posté le 11-03-2004 à 10:22:19  profilanswer
 

set Path=%Path%;a:\comdos
rajoute a:\condos dans la liste

n°670672
snow_93
P@iC CitroN
Posté le 11-03-2004 à 13:01:37  profilanswer
 

ça change rien  :sweat:  
voila ce q g:
 

Code :
  1. @ECHO OFF
  2. if "%config%"=="ghost" goto enter
  3. IF "%config%"=="nocd" goto quit
  4. if "%config%"=="cd" goto enter
  5. :quit
  6. echo vous allez demarrer sans cd de demarrage
  7. goto norm
  8. :enter
  9. path=a:\comdos;
  10. a:\comdos\MSCDEX.EXE /D:MSCD000 /L:Q
  11. :norm         
  12. MODE CON CODEPAGE PREPARE=((850) a:\comdos\EGA.CPI)
  13. MODE CON CODEPAGE SELECT=850
  14. KEYB FR,,a:\comdos\KEYBOARD.SYS
  15. a:\doskey.com
  16. a:\ctmouse.exe   
  17. if "%config%"=="ghost" goto ghost
  18. set Path=%Path%;a:\comdos
  19. goto fin
  20. :ghost
  21. q:\ghost\ghost.exe
  22. :fin
  23. echo 1 2 3
  24. rem echo set /p <nom_de_ta_variable> = <chaine a afficher>
  25. set /p choix= quel choix hen
  26. if "%choix%"==1 goto un
  27. if "%choix%"==2 goto deux
  28. if "%choix%"==3 goto trois
  29. goto fin
  30. :un
  31. dir
  32. goto fin
  33. :deux
  34. dir /w
  35. goto fin
  36. :trois
  37. dir /?
  38. goto fin


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Shell/Batch

  [DOS] ligne de commande

 

Sujets relatifs
[DOS] forcer le cd sur une lettre au boot!!! [trouvé]Signification précise d'une ligne (onChange= .... )
[PHP] je n'arrive pas a executer une commande via PHPPb de DNS sous DOS
[PHP] Exécuter une commande en cliquant sur un lienligne de commande
Voir en permanance la dernière ligne d'un TListBoxDivision sous DOS: résultat en nombre décimal
Ligne de commande sous DosUn editeur de texte en ligne de commande ..DOS ???
Plus de sujets relatifs à : [DOS] ligne de commande


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR