Bonsoir a tous,

J'essaye de creer un batch qui me permet de lancer un petit programme.
Celui ci me genère un fichier au format txt qui doit etre intégré dans une application.

Mon souci c'est que dans mon batch j'ai une condition if qui n'est pas prise en compte. Il considère que le fichier n'existe pas et vas donc en erreur alors qu'il existe bien dans mon répertoire...Je vous joint mon batch...

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
@echo off
echo Commande BAT pour importer les Previsions 
rem echo\
rem echo Appuyer sur <Ctrl>+<C> pour arreter le processus 
pause

"C:\Program Files\Fichiers communs\xrt\Clint 2.1\clint2.exe" "C:\Documents and Settings\admin\Bureau\Dev-clint\common\main.cli" "C:\Documents and Settings\admin\Bureau\Dev-clint\Entree\FRAM_R106_1806.txt"  "C:\Documents and Settings\admin\Bureau\Dev-clint\Sortie\integ_prev.txt"

if exist "integ_prev.txt" goto :action 
if not exist "integ_prev.txt" goto :error

:action
"E\MonAppli\appli.exe" -dbprofile WORKGROUP -login admin -password admin -tasks 164 -log INTEGRATIONlog.txt
echo\
echo Le process est termine
pause

:error
echo\
echo Pas de Fichier a importer
pause
goto :end
pause

:END
pause
exit
Merci à tous pour votre aide,