Bonjour,
j'ai finalement réussi à créer mon .bat qui marche super sauf qu'il est destiné à être appelé sur un ordinateur équipé de Windows NT (je sais c'est pas la joie...), l'option setlocal ENABLEDELAYEDEXPANSION n'y est pas reconnue...
Je sais plus quoi faire car j'en ai absolument besoin...

Je vous laisse mon code si vous avez une idée de comment faire sans cette option :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@echo off
help setlocal
setlocal  ENABLEDELAYEDEXPANSION
 
 
for /f "tokens=2 delims=:+" %%a in (tampon_identifiant.txt) do (
 
                set adresse=%%a
        echo adresse : !adresse!
)
 
for /f "tokens=2 delims=+" %%b in (tampon_identifiant.txt) do (
 
        set champ=%%b
        echo champ :!champ!
)
for /f "tokens=4 delims=\-" %%c in (tampon_identifiant.txt) do (
         set numero=%%c
        echo numero : !numero!
echo L:\suzanne\Patients\%%c\!champ!\tampon.txt
)
If not exist "L:\suzanne\Patients\%numero%\%champ%\tampon.txt" mkdir "L:\suzanne\Patients\%numero%\%champ%"
echo 1 > "L:\suzanne\Patients\%numero%\%champ%\tampon.txt" 
 
move "L:%adresse%" "L:\suzanne\Patients\%numero%\%champ%"
 
set chemin = "L:\suzanne\Patients\%numero%\%champ%\tampon.txt"
 
for /f "tokens=1" %%d in (%chemin%) do (
     set bool=%%d
    echo bool: !bool!
)
 
endlocal
pause
J'ai vraiment besoin d'aide je commence à désespérer...
Merci mille fois d'avance,
Suzanne