informatique:windows:batch
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:windows:batch [2019/10/04 10:15] – yahiko | informatique:windows:batch [2021/06/25 14:45] – yahiko | ||
---|---|---|---|
Line 187: | Line 187: | ||
FORFILES /P " | FORFILES /P " | ||
</ | </ | ||
+ | |||
+ | ==== Tuer un processus ==== | ||
+ | <codedoc code: | ||
+ | TASKKILL /F /IM processus.exe | ||
+ | </ | ||
+ | |||
+ | Du coup, on peut faire un truc du genre : | ||
+ | |||
+ | <codedoc code: | ||
+ | TASKLIST /FI " | ||
+ | IF " | ||
+ | TASKKILL /F /IM machin.exe > NUL | ||
+ | ) ELSE ( | ||
+ | ECHO Machin pas lancé n'est pas lancé. | ||
+ | ) | ||
+ | </ | ||
+ | |||
+ | ==== Formater la date ==== | ||
+ | La variable d' | ||
+ | <codedoc code: | ||
+ | %date:/=-% | ||
+ | Retourne : JJ-MM-AAAA | ||
+ | |||
+ | %date:/=_% | ||
+ | Retourne : JJ_MM_AAAA | ||
+ | |||
+ | Par exemple | ||
+ | mkdir prout\%date:/ | ||
+ | Retourne un dossier prout\JJ-MM-AAAA | ||
+ | </ | ||
+ |
informatique/windows/batch.txt · Last modified: 2023/09/14 08:46 by yahiko