BATCH: Compter le nombre de ligne de plusieur fichier
Résolu/Fermé
poparnassus
Messages postés
426
Date d'inscription
vendredi 28 mars 2014
Statut
Membre
Dernière intervention
25 décembre 2019
-
26 mars 2017 à 22:30
barnabe0057 Messages postés 14439 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 14 avril 2024 - 27 mars 2017 à 01:04
barnabe0057 Messages postés 14439 Date d'inscription lundi 2 mars 2009 Statut Contributeur Dernière intervention 14 avril 2024 - 27 mars 2017 à 01:04
A voir également:
- BATCH: Compter le nombre de ligne de plusieur fichier
- 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
14439
Date d'inscription
lundi 2 mars 2009
Statut
Contributeur
Dernière intervention
14 avril 2024
4 905
Modifié le 27 mars 2017 à 00:22
Modifié le 27 mars 2017 à 00:22
Bonsoir,
Voilà la solution :
Voilà la solution :
@echo off
Setlocal enableextensions enabledelayedexpansion
set /a total=0
for %%A in (*.c *.h) do (
set /a compt=0
for /f "tokens=*" %%I in ('type "%%A"') do (set /a compt+=1)
echo %%~dpnxA : !compt!
set /a total=!total!+!compt!
)
echo. & echo Total : !total!
Endlocal
pause
exit
27 mars 2017 à 00:31
27 mars 2017 à 00:35
Modifié le 27 mars 2017 à 00:59
Il sert juste a recupere le chemin ?
Modifié le 27 mars 2017 à 01:06