Site Tools


informatique:windows:batch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
informatique:windows:batch [2025/12/03 13:21] – [Compresser] yahikoinformatique:windows:batch [2025/12/03 13:49] (current) yahiko
Line 317: Line 317:
   * https://superuser.com/questions/1251959/batch-script-to-create-multiple-folders-within-multiple-folders   * https://superuser.com/questions/1251959/batch-script-to-create-multiple-folders-within-multiple-folders
   * https://www.experts-exchange.com/questions/25072173/Batch-Script-to-Read-CSV.html   * https://www.experts-exchange.com/questions/25072173/Batch-Script-to-Read-CSV.html
 +
 +==== Supprimer des espace à la fin d'une chaîne de caractères ====
 +<code batch>
 +SET "Variable=Ma super variable    "
 +
 +CALL :RTrim Variable
 +
 +ECHO Le retour de la variable : %Variable%
 +REM Va retourner "Ma super variable"
 +
 +REM --- Subroutine to trim trailing spaces ---
 +:RTrim
 +SET "str=!%1!"
 +:RTrimLoop
 +IF "!str:~-1!"==" " (
 +    SET "str=!str:~0,-1!"
 +    GOTO :RTrimLoop
 +)
 +SET "%1=%str%"
 +GOTO :EOF
 +</code>
 +
 +Source : 
 +
 +  * https://tutorialreference.com/batch-scripting/examples/faq/batch-script-how-to-trim-trailing-spaces-from-a-string
informatique/windows/batch.txt · Last modified: by yahiko