yamamoto_14 a dit :
@echo off
Goto %1
Goto Erreur
@if exist test.txt echo Le fichier test.txt existe. GOTO FIN
@if not exist test.txt echo Le fichier test.txt n'existe pas. GOTO Creer
:Creer
@echo rrtfreh >> test.txt
:FIN
Le deuxième script ne fonctionne pas.
Quelqu’un peut m’aider à arranger sa ?
s'tu veux
@echo off
Goto %1
Goto Erreur
@if exist test.txt GOTO FIN
@if not exist test.txt GOTO Creer
:Creer
@echo rrtfreh >> test.txt
:FIN
on ne peux pas faire deux chose en même temps dans un if, la solution barbare c'est de mettre deux if