This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatique:windows:batch [2025/01/13 11:02] – yahiko | informatique:windows:batch [2025/12/03 13:49] (current) – yahiko | ||
|---|---|---|---|
| Line 285: | Line 285: | ||
| ==== Compresser ==== | ==== Compresser ==== | ||
| - | Depuis 2019 Windows | + | Depuis 2019 Windows |
| <code batch> | <code batch> | ||
| Line 317: | Line 317: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | |||
| + | ==== Supprimer des espace à la fin d'une chaîne de caractères ==== | ||
| + | <code batch> | ||
| + | SET " | ||
| + | |||
| + | CALL :RTrim Variable | ||
| + | |||
| + | ECHO Le retour de la variable : %Variable% | ||
| + | REM Va retourner "Ma super variable" | ||
| + | |||
| + | REM --- Subroutine to trim trailing spaces --- | ||
| + | :RTrim | ||
| + | SET " | ||
| + | :RTrimLoop | ||
| + | IF " | ||
| + | SET " | ||
| + | GOTO :RTrimLoop | ||
| + | ) | ||
| + | SET " | ||
| + | GOTO :EOF | ||
| + | </ | ||
| + | |||
| + | Source : | ||
| + | |||
| + | * https:// | ||