Vérifier l'intitulé du path
Bonjour,
Voici le code suivant:
Code:
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
| rem ---------
rem pathname
rem ---------
:path
cls
call:hist
set p_value=
set /p p_value="Pathname? "
set f_count=
for %%a in (%p_value%\*.*) do (
set /a f_count+=1
)
if not exist "%p_value%" (
cls
call:hist
echo Pathname? Not found, enter a valid path.
%wait%
goto:path
)
if exist "%p_value%" if "%f_count%" equ "" (
cls
call:hist
echo Pathname? No files to process.
%wait%
goto:path
)
rem -------
rem remove
rem -------
if "%r_value%"=="1" if exist "%p_value%\%i_txt%" (
call:hist
................ |
Pour faire simple :aie:
- lorsque je saisis Pathname? e: (ça passe)
- si je saisis Pathname? e:\ (ça passe pas)
Je ne sais pas comment faire le test afin que la deuxième possibilité puisse être acceptée.
Pouvez-vous me donner un coup de main ?
Merci :mrgreen: