A voir également:
- Batch si variable commence par...
- Le nom d'une variable commence obligatoirement par : - Articles
- Batch increment variable - Forum - Programmation
- [Batch] Problème variable et boucle for ✓ - Forum - Windows
- [Batch] Afficher variable. ✓ - Forum - Autoit / batch
- [BATCH][FOR] Variable dynamique dans tokens.. ✓ - Forum - Autoit / batch
5 réponses
dubcek
2 avril 2010 à 07:50
- Messages postés
- 18503
- Date d'inscription
- lundi 15 janvier 2007
- Statut
- Contributeur
- Dernière intervention
- 25 mai 2022
2 avril 2010 à 07:50
hello
il faut extraire le premier caractère
C:> set zz=333
C:> echo %zz:~0,1%
3
C:> set zz=433
C:> echo %zz:~0,1%
4
C:>
il faut extraire le premier caractère
C:> set zz=333
C:> echo %zz:~0,1%
3
C:> set zz=433
C:> echo %zz:~0,1%
4
C:>
dubcek
2 avril 2010 à 16:33
- Messages postés
- 18503
- Date d'inscription
- lundi 15 janvier 2007
- Statut
- Contributeur
- Dernière intervention
- 25 mai 2022
2 avril 2010 à 16:33
comme ça
C:> set zz=123
C:> echo %zz:~-1%
3
C:> set zz=1234
C:> echo %zz:~-1%
4
C:> set zz=12345
C:> echo %zz:~-1%
5
C:> set zz=123
C:> echo %zz:~-1%
3
C:> set zz=1234
C:> echo %zz:~-1%
4
C:> set zz=12345
C:> echo %zz:~-1%
5
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question