Dévloppement BATCH
Fermé
ColdySky
-
15 juil. 2018 à 17:38
barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 - 15 juil. 2018 à 20:38
barnabe0057 Messages postés 14440 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 19 avril 2024 - 15 juil. 2018 à 20:38
A voir également:
- Dévloppement BATCH
- Fichier batch - Guide
- Msgbox batch ✓ - Forum Autoit / batch
- Net use batch - Forum Réseau
- Extension batch - Forum Windows
- Batch color - Forum Autoit / batch
1 réponse
barnabe0057
Messages postés
14440
Date d'inscription
lundi 2 mars 2009
Statut
Contributeur
Dernière intervention
19 avril 2024
4 906
15 juil. 2018 à 20:38
15 juil. 2018 à 20:38
Bonjour,
Essaie comme ça :
Si ça te convient tu n'as plus qu'à modifier le IF à ta convenance.
Essaie comme ça :
@echo off
setlocal enableextensions enabledelayedexpansion
chcp 1252 >nul
:suite
cls
set "phrase="
set /p phrase="Tapez votre phrase : "
set lettre1=!phrase:~0,1!
set derniere=!phrase:~-1!
set result=1
for %%A in (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do (
if "!lettre1!"=="%%A" (if "!derniere!"=="." (set result=2))
)
if !result! EQU 2 (echo start 2) else (echo start 1)
pause
goto :suite
Si ça te convient tu n'as plus qu'à modifier le IF à ta convenance.