[6058] | 1 | @echo off |
---|
| 2 | |
---|
| 3 | rem ************************************** |
---|
| 4 | rem Merci de ne PAS TOUCHER aux variables qui suivent !!! |
---|
| 5 | set titre=BATCH_OPTIMISATEUR |
---|
| 6 | set version=v5 |
---|
| 7 | set vdate=03.05.2010 |
---|
| 8 | set x=1 |
---|
| 9 | set y=7 |
---|
| 10 | set title=%titre% %version% du %vdate% |
---|
| 11 | set tps=4 |
---|
| 12 | rem ************************************** |
---|
| 13 | |
---|
| 14 | rem ************************************** |
---|
| 15 | set debug=0 |
---|
| 16 | rem debug=0 Le script s'exécute normalement |
---|
| 17 | rem debug=1 Mode debug actif TEMPORAIRE (cible quelques messages) |
---|
| 18 | rem debug=2 Mode debig actif en permanance. |
---|
| 19 | rem ************************************** |
---|
| 20 | |
---|
| 21 | rem SUPER ASTUCE: Le copier/coller qui fonctionne même avec MS-DOS !!! |
---|
| 22 | rem Exemple: copiez le texte que vous voulez et faites un clic droit dans la fenêtre dos ! |
---|
| 23 | rem MAGIQUE !!! Votre texte est collé !!! |
---|
| 24 | rem La combinaison Ctrl+V ne marche pas par contre... c'est le simple clic droit qui colle sur la fenêtre MS-DOS |
---|
| 25 | |
---|
| 26 | rem Permet de "Copier-coller" dans la console MS-DOS |
---|
| 27 | reg add "HKEY_CURRENT_USER\Console" /v QuickEdit /t REG_SZ /d 1 /f |
---|
| 28 | |
---|
| 29 | rem Initialisation des variables obligatoires |
---|
| 30 | set DIRinstall=%~dp0 |
---|
| 31 | set DIRtempo=%~dp0temp |
---|
| 32 | set DIRcompo=%~dp0composants |
---|
| 33 | set BOEXE=Batch_Optimisateur.exe |
---|
| 34 | rem Définition des composants |
---|
| 35 | set cechoEXE=%DIRcompo%\cecho.exe |
---|
| 36 | set formaterARB=%DIRcompo%\formater.arb |
---|
| 37 | set FreeWatchEXE=%DIRcompo%\FreeWatch.exe |
---|
| 38 | set indexPHP=%DIRcompo%\index.php |
---|
| 39 | set logoBAT=%DIRcompo%\logo.bat |
---|
| 40 | set nconvertEXE=%DIRcompo%\nconvert.exe |
---|
| 41 | set questionsBAT=%DIRcompo%\questions.bat |
---|
| 42 | set switchEXE=%DIRcompo%\switch.exe |
---|
| 43 | set vlogoBAT=%DIRcompo%\vlogo.bat |
---|
| 44 | rem Définition des fichiers temporaires |
---|
| 45 | set sourceTXT=%DIRtempo%\DIRsource.txt |
---|
| 46 | set sortieTXT=%DIRtempo%\DIRsortie.txt |
---|
| 47 | set sousrepTXT=%DIRtempo%\DIRsousrep.txt |
---|
| 48 | set supTXT=%DIRtempo%\DIRsup.txt |
---|
| 49 | set sortieNEWTXT=%DIRtempo%\DIRsortieNew.txt |
---|
| 50 | set listingTXT=%DIRtempo%\listing.txt |
---|
| 51 | rem Définition de variables... |
---|
| 52 | set setupTXT=%~dp0Setup.txt |
---|
| 53 | set vDPI=0 |
---|
| 54 | |
---|
| 55 | rem Identification du système (x86 ou x64) |
---|
| 56 | if exist "%PROGRAMFILES%" set SYS_3264=%PROGRAMFILES% |
---|
| 57 | if exist "%PROGRAMFILES(x86)%" set SYS_3264=%PROGRAMFILES(x86)% |
---|
| 58 | |
---|
| 59 | if "%debug%" == "2" ( |
---|
| 60 | echo Rpertoire prsent : "%SYS_3264%" |
---|
| 61 | pause |
---|
| 62 | cls |
---|
| 63 | ) |
---|
| 64 | |
---|
| 65 | rem Recherche du répertoire d'installation de Ant Renamer |
---|
| 66 | if exist "%PROGRAMFILES%\Ant Renamer\Renamer.exe" set renamerEXE=%PROGRAMFILES%\Ant Renamer\Renamer.exe |
---|
| 67 | if exist "%PROGRAMFILES(x86)%\Ant Renamer\Renamer.exe" set renamerEXE=%PROGRAMFILES(x86)%\Ant Renamer\Renamer.exe |
---|
| 68 | if not defined renamerEXE set merror10=Le logiciel tierce Ant Renamer n'a pas t trouv. Il faut l'installer. |
---|
| 69 | |
---|
| 70 | rem Taille de la fenêtre |
---|
| 71 | title %title% |
---|
| 72 | mode con lines=82 cols=80 |
---|
| 73 | color F1 |
---|
| 74 | |
---|
| 75 | if "%debug%" == "2" ( |
---|
| 76 | echo launched in %CD% |
---|
| 77 | echo i'm here %~dp0 |
---|
| 78 | rem echo Pour info, la commande %CD% donne le répertoire du fichier exécutant PARENT ! |
---|
| 79 | rem echo Pour info, la commande %~dp0 donne le répertoire (avec le slash \ ) du répertoire où se trouve le présent script ! |
---|
| 80 | echo %merror0% |
---|
| 81 | pause |
---|
| 82 | ) |
---|
| 83 | |
---|
| 84 | rem Initialisation du dossier temporaire. Si il existe on l'efface avant (pour le vider) avant de le recréer (vièrge) |
---|
| 85 | if exist "%DIRtempo%" del "%DIRtempo%" /s /q >nul |
---|
| 86 | if not exist "%DIRtempo%" mkdir "%DIRtempo%" >nul |
---|
| 87 | |
---|
| 88 | rem Vérification des composants indispensables. |
---|
| 89 | rem S'il ne sont pas présent, poursuite impossible... |
---|
| 90 | if not exist "%setupTXT%" set merror100=Le fichier Setup.txt n'a pas t trouv. |
---|
| 91 | rem Erreur 00 bloquante |
---|
| 92 | if defined merror100 goto :bleme |
---|
| 93 | if not exist "%cechoEXE%" set merror20=Le composant cecho.exe n'a pas t trouv. |
---|
| 94 | if not exist "%formaterARB%" set merror30=Le composant formater.arb n'a pas t trouv. |
---|
| 95 | if not exist "%FreeWatchEXE%" set merror40=Le composant FreeWatch.exe n'a pas t trouv. |
---|
| 96 | if not exist "%indexPHP%" set merror50=Le composant index.php n'a pas t trouv. |
---|
| 97 | if not exist "%logoBAT%" set merror50=Le composant logo.bat n'a pas t trouv. |
---|
| 98 | if not exist "%nconvertEXE%" set merror60=Le composant nconvert.exe n'a pas t trouv. |
---|
| 99 | if not exist "%questionsBAT%" set merror70=Le composant questions.bat n'a pas t trouv. |
---|
| 100 | if not exist "%switchEXE%" set merror80=Le composant switch.exe n'a pas t trouv. |
---|
| 101 | :: if not exist "%vlogoBAT%" set merror90=Le composant vlogo.bat n'a pas t trouv. |
---|
| 102 | |
---|
| 103 | rem Appel du fichier Setup.txt (avant, je l'aurait converti en .bat) |
---|
| 104 | copy "%setupTXT%" "%DIRtempo%\Setup.bat">nul |
---|
| 105 | call "%DIRtempo%\Setup.bat" |
---|
| 106 | |
---|
| 107 | rem Condition d'annulation de procédure |
---|
| 108 | for /L %%d in (0,1,199) do if defined merror%%d goto :bleme |
---|
| 109 | |
---|
| 110 | :P0 |
---|
| 111 | rem Condition de saut grâce à un paramètre transmis par un logiciel tiers (LrLoader). |
---|
| 112 | if "%silentORNOT%" == "o" goto :L0 |
---|
| 113 | rem Condition de saut grâce à un paramètre transmis par question.bat Comme ce dernier est lancé APRES :P0 |
---|
| 114 | rem et que la boucle oublige à revenir plus haut, l'étape :P0 n'est plus utile pour ce cas. |
---|
| 115 | if "%gfini%" == "1" goto :L0 |
---|
| 116 | set question= |
---|
| 117 | color F1 |
---|
| 118 | call :header |
---|
| 119 | if "%silentORNOT%" == "o" ( |
---|
| 120 | echo. |
---|
| 121 | echo ATTENTION ^!^!^! ATTENTION ^!^!^! ATTENTION ^!^!^! ATTENTION ^!^!^! ATTENTION ^!^!^! |
---|
| 122 | echo Le mode silencieux est activ ce qui veut dire que Batch_Optimisateur n'affichera |
---|
| 123 | echo pas toutes les fenêtres. Vous gagnez ansi de en facilté. |
---|
| 124 | echo. |
---|
| 125 | echo. |
---|
| 126 | echo Gardez à l'esprit que Batch_Optimisateur prendra certaines décisions à votre place. |
---|
| 127 | echo Consulter le fichier Lisez-moi.rtf pour plus d'informations. |
---|
| 128 | echo. |
---|
| 129 | echo. |
---|
| 130 | echo. |
---|
| 131 | echo. |
---|
| 132 | echo. |
---|
| 133 | echo. |
---|
| 134 | echo. |
---|
| 135 | echo Appuyez sur une touche pour lancer Batch_Optimisateur en mode silencieux. |
---|
| 136 | echo. |
---|
| 137 | echo. |
---|
| 138 | pause> nul |
---|
| 139 | cls |
---|
| 140 | goto :L0 |
---|
| 141 | ) else ( |
---|
| 142 | echo. |
---|
| 143 | echo. |
---|
| 144 | echo. |
---|
| 145 | echo Voulez vous diter le fichier "Setup.txt" |
---|
| 146 | echo Dans le but de modifier vos paramtres par dfaut ? [o] - [n] |
---|
| 147 | echo. |
---|
| 148 | echo. |
---|
| 149 | echo Validez en appuyant sur la touche "Entre" |
---|
| 150 | echo. |
---|
| 151 | set /p question= |
---|
| 152 | ) |
---|
| 153 | if "%question%" == "o" goto :P1 |
---|
| 154 | if "%question%" == "n" goto :L0 |
---|
| 155 | cls |
---|
| 156 | goto :P0 |
---|
| 157 | |
---|
| 158 | :P1 |
---|
| 159 | if "%silentORNOT%" == "o" goto :L1 |
---|
| 160 | rem action à exécuter lors de l'édition du fichier Setup.txt |
---|
| 161 | call :header |
---|
| 162 | echo Le fichier "%DIRinstall%Setup.txt" ... |
---|
| 163 | echo ... viens de s'ouvrir avec le bloc-notes. |
---|
| 164 | echo. |
---|
| 165 | echo Une fois l'édition du fichier terminée, veuillez fermer le bloc-notes |
---|
| 166 | start /wait notepad.exe "%DIRinstall%Setup.txt" |
---|
| 167 | |
---|
| 168 | :L0 |
---|
| 169 | rem Re-lecture |
---|
| 170 | call "%DIRtempo%\Setup.bat" |
---|
| 171 | |
---|
| 172 | :L1 |
---|
| 173 | if "%debug%" == "2" ( |
---|
| 174 | cls |
---|
| 175 | echo I'm here, after first panel... |
---|
| 176 | echo. |
---|
| 177 | echo Affichage des variable lues et prises en compte. |
---|
| 178 | echo. |
---|
| 179 | echo. |
---|
| 180 | echo logoORNOT %logoORNOT% |
---|
| 181 | echo DIRsource %DIRsource% |
---|
| 182 | echo DIRsortie %DIRsortie% |
---|
| 183 | echo copyORNOT %copyORNOT% |
---|
| 184 | echo copyright %copyright% |
---|
| 185 | echo DIRhightORNOT %DIRhightORNOT% |
---|
| 186 | echo DIMhdORNOT %DIMhdORNOT% |
---|
| 187 | echo paramdefORNOT %paramdefORNOT% |
---|
| 188 | echo DIMhd %DIMhd% |
---|
| 189 | echo DIMnormal %DIMnormal% |
---|
| 190 | echo DIMthumbnail %DIMthumbnail% |
---|
| 191 | echo Qhd %Qhd% |
---|
| 192 | echo Qnormal %Qnormal% |
---|
| 193 | echo Qthumbnail %Qthumbnail% |
---|
| 194 | echo prefixe_mini %prefixe_mini% |
---|
| 195 | echo renameORNOT %renameORNOT% |
---|
| 196 | echo FreeWatchORNOT %FreeWatchORNOT% |
---|
| 197 | echo DPIH %DPIH% |
---|
| 198 | echo DPIV %DPIV% |
---|
| 199 | echo openbehindORNOT %openbehindORNOT% |
---|
| 200 | echo openafterORNOT %openbehindORNOT% |
---|
| 201 | echo silentORNOT %silentORNOT% |
---|
| 202 | echo. |
---|
| 203 | echo module1 %module1% |
---|
| 204 | echo module2 %module2% |
---|
| 205 | echo module3 %module3% |
---|
| 206 | echo module4 %module4% |
---|
| 207 | echo module5 %module5% |
---|
| 208 | echo module6 %module6% |
---|
| 209 | echo module7 %module7% |
---|
| 210 | echo module8 %module8% |
---|
| 211 | echo module9 %module9% |
---|
| 212 | echo module10 %module10% |
---|
| 213 | echo module11 %module11% |
---|
| 214 | echo module12 %module12% |
---|
| 215 | echo module13 %module13% |
---|
| 216 | echo module14 %module14% |
---|
| 217 | echo module15 %module15% |
---|
| 218 | echo module16 %module16% |
---|
| 219 | echo module17 %module17% |
---|
| 220 | echo module18 %module18% |
---|
| 221 | echo module19 %module19% |
---|
| 222 | echo module20 %module20% |
---|
| 223 | pause |
---|
| 224 | cls |
---|
| 225 | ) |
---|
| 226 | |
---|
| 227 | :eta1 |
---|
| 228 | rem Correction arbitraire de deux répertoires pour eviter trop de complications... |
---|
| 229 | if defined DIRsource (if not exist "%DIRsource%" set DIRsource=) |
---|
| 230 | if defined DIRsortie (if not exist "%DIRsortie%" set DIRsortie=) |
---|
| 231 | |
---|
| 232 | |
---|
| 233 | rem Vérifiaction et/ou rectification des données relatives à la qualité des images en sortie de traitement. |
---|
| 234 | if not defined Qhd set Qhd=90 |
---|
| 235 | if /i %Qhd% GTR 100 set Qhd= |
---|
| 236 | if not defined Qnormal set Qnormal=80 |
---|
| 237 | if /i %Qnormal% GTR 100 set Qnormal= |
---|
| 238 | if not defined Qthumbnail set Qthumbnail=70 |
---|
| 239 | if /i %Qthumbnail% GTR 100 set Qthumbnail= |
---|
| 240 | |
---|
| 241 | rem Vérification et/ou rectification des données relatives à la dimension des images en sortie de traitement. |
---|
| 242 | if not defined DIMthumbnail set DIMthumbnail= |
---|
| 243 | if not defined DIMnormal set DIMnormal= |
---|
| 244 | if not defined DIMhd set DIMhd= |
---|
| 245 | |
---|
| 246 | if /i %DIMhd% LEQ %DIMnormal% set merror101=La valeure de dimensions de DIMhd (ou DIMnoraml) est ilogique. |
---|
| 247 | if /i %DIMhd% LEQ %DIMthumbnail% set merror101=La valeure de dimensions de DIMhd (ou DIMnoraml) est ilogique. |
---|
| 248 | |
---|
| 249 | if /i %DIMnormal% LEQ %DIMthumbnail% set merror102=La valeure de dimensions de DIMnormal (ou DIMthumbnail) est ilogique. |
---|
| 250 | if /i %DIMnormal% GEQ %DIMhd% set merror102=La valeure de dimensions de DIMnormal (ou DIMthumbnail) est ilogique. |
---|
| 251 | |
---|
| 252 | if /i %DIMthumbnail% GEQ %DIMnormal% set merror103=La valeure de dimensions de DIMthumbnail (ou DIMnormal) est ilogique. |
---|
| 253 | if /i %DIMthumbnail% GEQ %DIMhd% set merror103=La valeure de dimensions de DIMthumbnail (ou DIMnormal) est ilogique. |
---|
| 254 | |
---|
| 255 | rem Vérification de la pertinence des informations saisies pour les variables "ORNOT" |
---|
| 256 | if not defined logoORNOT set logoORNOT=o |
---|
| 257 | if /i "%logoORnot%" NEQ "o" ( |
---|
| 258 | if /i "%logoORnot%" NEQ "n" ( |
---|
| 259 | set merror104= Dans le fichier "Setup.txt" la valeure donne
logoORNOT est rone ! |
---|
| 260 | ) |
---|
| 261 | ) |
---|
| 262 | if defined copyORNOT ( |
---|
| 263 | if /i "%copyORNOT%" NEQ "o" ( |
---|
| 264 | if /i "%copyORNOT%" NEQ "n" ( |
---|
| 265 | set merror105= Dans le fichier "Setup.txt" la valeure donne
copyORNOT est rone ! |
---|
| 266 | ) |
---|
| 267 | ) |
---|
| 268 | ) else ( |
---|
| 269 | echo La variable copyORNOT est vide. |
---|
| 270 | ) |
---|
| 271 | if defined DIRhightORNOT ( |
---|
| 272 | if /i "%DIRhightORNOT%" NEQ "o" ( |
---|
| 273 | if /i "%DIRhightORNOT%" NEQ "n" ( |
---|
| 274 | set merror106= Dans le fichier "Setup.txt" la valeure donne
DIRhightORNOT est rone ! |
---|
| 275 | ) |
---|
| 276 | ) |
---|
| 277 | ) else ( |
---|
| 278 | echo La variable DIRhightORNOT est vide. |
---|
| 279 | ) |
---|
| 280 | if defined DIMhdORNOT ( |
---|
| 281 | if /i "%DIMhdORNOT%" NEQ "o" ( |
---|
| 282 | if /i "%DIMhdORNOT%" NEQ "n" ( |
---|
| 283 | set merror107= Dans le fichier "Setup.txt" la valeure donne
DIMhdORNOT est rone ! |
---|
| 284 | ) |
---|
| 285 | ) |
---|
| 286 | ) else ( |
---|
| 287 | echo La variable DIMhdORNOT est vide. |
---|
| 288 | ) |
---|
| 289 | if defined paramdefORNOT ( |
---|
| 290 | if /i "%paramdefORNOT%" NEQ "o" ( |
---|
| 291 | if /i "%paramdefORNOT%" NEQ "n" ( |
---|
| 292 | set merror108= Dans le fichier "Setup.txt" la valeure donne
paramdefORNOT est rone ! |
---|
| 293 | ) |
---|
| 294 | ) |
---|
| 295 | ) else ( |
---|
| 296 | echo La variable paramdefORNOT est vide. |
---|
| 297 | ) |
---|
| 298 | if defined renameORNOT ( |
---|
| 299 | if /i "%renameORNOT%" NEQ "o" ( |
---|
| 300 | if /i "%renameORNOT%" NEQ "n" ( |
---|
| 301 | set merror109= Dans le fichier "Setup.txt" la valeure donne
renameORNOT est rone ! |
---|
| 302 | ) |
---|
| 303 | ) |
---|
| 304 | ) else ( |
---|
| 305 | echo La variable renameORNOT est vide. |
---|
| 306 | ) |
---|
| 307 | if defined FreeWatchORNOT ( |
---|
| 308 | if /i "%FreeWatchORNOT%" NEQ "o" ( |
---|
| 309 | if /i "%FreeWatchORNOT%" NEQ "n" ( |
---|
| 310 | set merror110= Dans le fichier "Setup.txt" la valeure donne
FreeWatchORNOT est rone ! |
---|
| 311 | ) |
---|
| 312 | ) |
---|
| 313 | ) else ( |
---|
| 314 | echo La variable FreeWatchORNOT est vide. |
---|
| 315 | ) |
---|
| 316 | if defined DPIH set /a vDPI=%vDPI%+1 |
---|
| 317 | if defined DPIV set /a vDPI=%vDPI%+1 |
---|
| 318 | if "%vDPI%" NEQ "0" ( |
---|
| 319 | if "%vDPI%" == "2" ( |
---|
| 320 | set DPI=-dpi %DPIH%x%DPIV% |
---|
| 321 | ) |
---|
| 322 | if not defined DPIH (set merror111= Dans le fichier "Setup.txt" une valeure donne
aux DPI est rone !) else (if not defined DPIV (set merror111= Dans le fichier "Setup.txt" une valeure donne
aux DPI est rone !)) |
---|
| 323 | ) |
---|
| 324 | if defined openbehindORNOT ( |
---|
| 325 | if /i "%openbehindORNOT%" NEQ "o" ( |
---|
| 326 | if /i "%openbehindORNOT%" NEQ "n" ( |
---|
| 327 | set merror112= Dans le fichier "Setup.txt" la valeure donne
openbehindORNOT est rone ! |
---|
| 328 | ) |
---|
| 329 | ) |
---|
| 330 | ) else ( |
---|
| 331 | echo La variable FreeWatchORNOT est vide. |
---|
| 332 | ) |
---|
| 333 | if defined openafterORNOT ( |
---|
| 334 | if /i "%openafterORNOT%" NEQ "o" ( |
---|
| 335 | if /i "%openafterORNOT%" NEQ "n" ( |
---|
| 336 | set merror113= Dans le fichier "Setup.txt" la valeure donne
openafterORNOT est rone ! |
---|
| 337 | ) |
---|
| 338 | ) |
---|
| 339 | ) else ( |
---|
| 340 | echo La variable openafterORNOT est vide. |
---|
| 341 | ) |
---|
| 342 | if defined silentORNOT ( |
---|
| 343 | if /i "%silentORNOT%" NEQ "o" ( |
---|
| 344 | if /i "%silentORNOT%" NEQ "n" ( |
---|
| 345 | set merror114= Dans le fichier "Setup.txt" la valeure donne
silentORNOT est rone ! |
---|
| 346 | ) |
---|
| 347 | ) |
---|
| 348 | ) else ( |
---|
| 349 | echo La variable silentORNOT est vide. |
---|
| 350 | ) |
---|
| 351 | |
---|
| 352 | rem Autres vérifiactions |
---|
| 353 | if not defined prefixe_mini set prefixe_mini= |
---|
| 354 | |
---|
| 355 | rem Vérification la plus importante. Si cette condition n'est pas respéctée les autres messages d'erreurs ne safficheront même pas car le batch s'arrêtera avant. merro=0 |
---|
| 356 | rem Savoir sir le dossier de sortie est vide ou pas. |
---|
| 357 | if defined DIRsortie ( |
---|
| 358 | for /f "delims=" %%a in ('dir "%DIRsortie%" /b') do ( |
---|
| 359 | if "%%a" NEQ "" ( |
---|
| 360 | set merror0=Le rpertoire de sortie n'est pas vide. Veuillez le vider avant. |
---|
| 361 | ) |
---|
| 362 | ) |
---|
| 363 | ) |
---|
| 364 | |
---|
| 365 | rem Si le lancement de Batch_Optimisateur est silentieux (mode Silent) alors l'erreur n'apparait pas. Le répertoire sera vidé automatiquement. |
---|
| 366 | if "%silentORNOT%" == "o" if defined merror0 set merror0= |
---|
| 367 | |
---|
| 368 | rem Vérification que le répertoire source contienne bien des fichiers... |
---|
| 369 | if not exist "%DIRsource%\*.*" set merror9=Le rpertoire "source" ne contient aucune fichiers... Incorrect ! |
---|
| 370 | |
---|
| 371 | rem Renvoie à l'étiquette "bleme2" en cas d'erreur qui peux |
---|
| 372 | for /L %%b in (0,1,8) do if defined merror%%b goto bleme2 |
---|
| 373 | rem Renvoie à l'étiquette "bleme" en cas d'erreur |
---|
| 374 | for /L %%b in (9,1,199) do if defined merror%%b goto bleme |
---|
| 375 | |
---|
| 376 | if "%debug%" == "2" ( |
---|
| 377 | echo i'm here :eta1 |
---|
| 378 | pause |
---|
| 379 | cls |
---|
| 380 | ) |
---|
| 381 | |
---|
| 382 | :eta2 |
---|
| 383 | rem Appel de question.bat |
---|
| 384 | rem En fonction des réponse déjà programmées dans Steup.txt, question.bat n'affichera que le nécessaire. |
---|
| 385 | cls |
---|
| 386 | call "%questionsBAT%" |
---|
| 387 | if "%gfini%" NEQ "1" goto :eta1 |
---|
| 388 | |
---|
| 389 | :eta3 |
---|
| 390 | if "%silentORNOT%" == "o" goto :eta5 |
---|
| 391 | if "%openbehindORNOT%" == "n" goto :eta4 |
---|
| 392 | rem Action à exécuter une fois le fichier Setup.txt édité |
---|
| 393 | call :header |
---|
| 394 | echo. |
---|
| 395 | echo. |
---|
| 396 | echo. |
---|
| 397 | echo Ouverture des dossiers : |
---|
| 398 | echo - "%DIRsource%" |
---|
| 399 | echo - "%DIRsortie%" |
---|
| 400 | echo. |
---|
| 401 | explorer "%DIRsource%" |
---|
| 402 | explorer "%DIRsortie%" |
---|
| 403 | echo. |
---|
| 404 | echo. |
---|
| 405 | echo. |
---|
| 406 | echo. |
---|
| 407 | pause |
---|
| 408 | |
---|
| 409 | if "%debug%" == "2" ( |
---|
| 410 | echo i'm here :eta3 |
---|
| 411 | pause |
---|
| 412 | ) |
---|
| 413 | |
---|
| 414 | :eta4 |
---|
| 415 | if "%silentORNOT%" == "o" goto :eta5 |
---|
| 416 | cls |
---|
| 417 | rem page de présentation |
---|
| 418 | if "%logoORNOT%" == "n" goto :eta5 |
---|
| 419 | call "%vlogoBAT%" |
---|
| 420 | |
---|
| 421 | if "%debug%" == "2" ( |
---|
| 422 | echo i'm here :eta4 |
---|
| 423 | pause |
---|
| 424 | ) |
---|
| 425 | |
---|
| 426 | :eta5 |
---|
| 427 | if "%silentORNOT%" == "o" ( |
---|
| 428 | rmdir "%DIRsortie%" /s /q |
---|
| 429 | ping -n 2 127.0.0.1 > NUL |
---|
| 430 | mkdir "%DIRsortie%" |
---|
| 431 | ) |
---|
| 432 | |
---|
| 433 | if "%debug%" == "2" ( |
---|
| 434 | echo i'm here :eta5 |
---|
| 435 | pause |
---|
| 436 | ) |
---|
| 437 | |
---|
| 438 | :eta6 |
---|
| 439 | color 07 |
---|
| 440 | rem Lancement du chronographe |
---|
| 441 | if "%FreeWatchORNOT%" == "o" ( |
---|
| 442 | start composants\FreeWatch.exe /start /label "Temps de traitement de Batch_Optimisateur" |
---|
| 443 | ) |
---|
| 444 | |
---|
| 445 | if "%debug%" == "2" ( |
---|
| 446 | echo i'm here :eta6 |
---|
| 447 | pause |
---|
| 448 | ) |
---|
| 449 | |
---|
| 450 | :eta7 |
---|
| 451 | rem Préparatifs |
---|
| 452 | |
---|
| 453 | rem Formatage des arguments |
---|
| 454 | |
---|
| 455 | :f0 |
---|
| 456 | rem Le texte |
---|
| 457 | |
---|
| 458 | :f1 |
---|
| 459 | rem Definition de la taille du texte |
---|
| 460 | |
---|
| 461 | :tailleN1 |
---|
| 462 | rem Images Normales |
---|
| 463 | rem x < 800 |
---|
| 464 | rem 800 >= x < 1023 |
---|
| 465 | rem x >= 1024 |
---|
| 466 | rem commande01=taille 10 inf a 800 |
---|
| 467 | rem commande02=taille 16 compris entre 800 et 1023 |
---|
| 468 | rem commande03=taille 18 sup ou egal a 1024 |
---|
| 469 | |
---|
| 470 | if %DIMnormal% LSS 800 set tailleN1=10 & goto :tailleHD |
---|
| 471 | if %DIMnormal% GEQ 800 if %DIMnormal% LSS 1023 set tailleN1=16 & goto :tailleHD |
---|
| 472 | if %DIMnormal% GEQ 1024 set tailleN1=18 & goto :tailleHD |
---|
| 473 | |
---|
| 474 | :tailleHD |
---|
| 475 | rem Images HD |
---|
| 476 | rem x < 1024 |
---|
| 477 | rem 1024 > x > 1279 |
---|
| 478 | rem x >= 1280 |
---|
| 479 | rem commande11=taille 16 inf a 1024 |
---|
| 480 | rem commande12=taille 18 compris entre 1024 et 1279 |
---|
| 481 | rem commande13=taille 20 sup ou egal a 1280 |
---|
| 482 | |
---|
| 483 | if %DIMhd% LSS 1024 set tailleHD=16 & goto :f2 |
---|
| 484 | if %DIMhd% GEQ 1024 if %DIMhd% LSS 1279 set tailleHD=18 & goto :f2 |
---|
| 485 | if %DIMhd% GEQ 1280 set tailleHD=20 & goto :f2 |
---|
| 486 | |
---|
| 487 | :f2 |
---|
| 488 | if "%prefixe_mini%" == " " set prefixe_mini= |
---|
| 489 | if "%copyright%" == " " set texte= |
---|
| 490 | if "%copyORNOT%" == "n" set texte= |
---|
| 491 | if "%copyORNOT%" == "n" goto :f3 |
---|
| 492 | set texteN1=-text_font "MS Reference Sans Serif" %tailleN1% -text_color 0 0 0 -text_back 192 192 192 -text_flag bottom-left -text_pos 0 0 -text "%copyright%" |
---|
| 493 | set texteHD=-text_font "MS Reference Sans Serif" %tailleHD% -text_color 0 0 0 -text_back 192 192 192 -text_flag bottom-left -text_pos 0 0 -text "%copyright%" |
---|
| 494 | |
---|
| 495 | :f3 |
---|
| 496 | rem Le redimentionnement |
---|
| 497 | set resize=-ratio -rtype lanczos -rflag decr |
---|
| 498 | rem Incrustration d'un texte pour le copyright en bas à gauche, fond blanc, texte en noir, taille exprimée avec un facteur de x1,38 par rapport à la taille de base dans Xnview. |
---|
| 499 | rem Exemple, pour une police de T13, on obtient en batch: 13*1,38=18. T18 donc... |
---|
| 500 | rem Le symbole du © copyright, d'habitude obtenue avec la combinaison de touches [alt]0169 est en fait obtenue içi avec la combinaison de touches [alt]0184 |
---|
| 501 | rem Allez comprendre quelque chose... |
---|
| 502 | |
---|
| 503 | :modulesA |
---|
| 504 | cls |
---|
| 505 | rem Lancement des modules qui agissent sur les photos dans le répertoire d'entrée (DIRsource). |
---|
| 506 | rem Stop le chronographe si déjà lancé. |
---|
| 507 | taskList | findstr /c:FreeWatch.exe |
---|
| 508 | if "%ERRORLEVEL%" == "0" start composants\FreeWatch.exe /stop |
---|
| 509 | cls |
---|
| 510 | echo. |
---|
| 511 | echo. |
---|
| 512 | echo En attente des modules... |
---|
| 513 | echo. |
---|
| 514 | |
---|
| 515 | if defined module01 call %module01% |
---|
| 516 | if defined module02 call %module02% |
---|
| 517 | if defined module03 call %module03% |
---|
| 518 | if defined module04 call %module04% |
---|
| 519 | if defined module05 call %module05% |
---|
| 520 | if defined module06 call %module06% |
---|
| 521 | if defined module07 call %module07% |
---|
| 522 | if defined module08 call %module08% |
---|
| 523 | if defined module09 call %module09% |
---|
| 524 | if defined module10 call %module10% |
---|
| 525 | |
---|
| 526 | color 07 |
---|
| 527 | |
---|
| 528 | if "%debug%" == "2" ( |
---|
| 529 | echo i'm here :modulesA |
---|
| 530 | pause |
---|
| 531 | ) |
---|
| 532 | |
---|
| 533 | cls |
---|
| 534 | |
---|
| 535 | :et100 |
---|
| 536 | rem Reprise du chronomètre si déjà ouvert. |
---|
| 537 | taskList | findstr /c:FreeWatch.exe |
---|
| 538 | if "%ERRORLEVEL%" == "0" start composants\FreeWatch.exe /start |
---|
| 539 | rem Titre de la fenêtre |
---|
| 540 | set etape= *** Etape %x% sur %y% *** |
---|
| 541 | title %titre%%etape% |
---|
| 542 | cls |
---|
| 543 | rem Formatage des noms de dossiers + fichiers à l'aide du logiciel Renamer |
---|
| 544 | if "%renameORNOT%" == "n" ( |
---|
| 545 | goto :et200 |
---|
| 546 | ) else ( |
---|
| 547 | "%renamerEXE%" -b "%formaterARB%" -afr "%DIRsource%\*.*" -aFr "%DIRsource%\*.*" -g -x |
---|
| 548 | ) |
---|
| 549 | |
---|
| 550 | if "%debug%" == "2" ( |
---|
| 551 | echo i'm here :et100 |
---|
| 552 | pause |
---|
| 553 | ) |
---|
| 554 | |
---|
| 555 | :et200 |
---|
| 556 | rem Titre de la fenêtre |
---|
| 557 | set /a x=%x%+1 |
---|
| 558 | set etape= *** Etape %x% sur %y% *** |
---|
| 559 | title %titre%%etape% |
---|
| 560 | cls |
---|
| 561 | rem Je liste le contenu de %DIRsource% vers deux fichiers |
---|
| 562 | echo %DIRsource%> "%sourceTXT%" |
---|
| 563 | dir "%DIRsource%" /AD /B /S>> "%sourceTXT%" |
---|
| 564 | echo %DIRsource%> "%sortieTXT%" |
---|
| 565 | dir "%DIRsource%" /AD /B /S>> "%sortieTXT%" |
---|
| 566 | rem Je transforme les occurences contenant le chemin de DIRsource pour les remplacer par celles du DIRsortie |
---|
| 567 | echo "%switchEXE%" "%sortieTXT%" "%DIRsource%" "%DIRsortie%"> "%DIRtempo%\tmp.bat" |
---|
| 568 | call "%DIRtempo%\tmp.bat" |
---|
| 569 | rem Création des deux sous répertoires |
---|
| 570 | rem Boucle pour tous les sous rep |
---|
| 571 | if "%DIRhightORNOT%" == "o" ( |
---|
| 572 | for /f %%a in ('type "%sortieTXT%"') do mkdir "%%a\pwg_high\" |
---|
| 573 | ) |
---|
| 574 | for /f %%a in ('type "%sortieTXT%"') do mkdir %%a\thumbnail\ |
---|
| 575 | rem Création d'un fichier ne contenant QUE les sous repertoires !!! |
---|
| 576 | dir "%DIRsource%" /AD /B /S> "%sousrepTXT%" |
---|
| 577 | "%switchEXE%" "%sousrepTXT%" "%DIRsource%" "" |
---|
| 578 | |
---|
| 579 | if "%debug%" == "1" ( |
---|
| 580 | echo i'm here :et200 |
---|
| 581 | echo %sortieTXT% |
---|
| 582 | echo %DIRsource% |
---|
| 583 | echo %DIRsortie% |
---|
| 584 | pause |
---|
| 585 | ) |
---|
| 586 | |
---|
| 587 | del "%DIRtempo%\tmp.bat" /s /q |
---|
| 588 | |
---|
| 589 | :et300 |
---|
| 590 | rem Titre de la fenêtre |
---|
| 591 | set /a x=%x%+1 |
---|
| 592 | set etape= *** Etape %x% sur %y% *** |
---|
| 593 | title %titre%%etape% |
---|
| 594 | cls |
---|
| 595 | rem Edition des images en haute qualité |
---|
| 596 | rem Le script est modifiable facilement avec XnView. |
---|
| 597 | rem répertoire d'entrée: %DIRsource%\%%a\ Fichiers concernés: *.jpg |
---|
| 598 | rem répertoire de sortie: %DIRsortie%\%%a\pwg_high\ Fichiers concernés %%.jpg |
---|
| 599 | rem Redimensionnement avec le plus grand coté limité à %dimhd% pixels |
---|
| 600 | if "%DIRhightORNOT%" == "o" ( |
---|
| 601 | if "%DIMhdORNOT%" == "o" ( |
---|
| 602 | "%nconvertEXE%" -q %Qhd% -out jpeg -o "%DIRsortie%\pwg_high\%%.jpg" %resize% -resize %DIMhd% %DIMhd% "%DIRsource%\*.jpg" |
---|
| 603 | ) else ( |
---|
| 604 | xcopy "%DIRsource%\*.jpg" "%DIRsortie%\pwg_high\" /f /y> nul |
---|
| 605 | ) |
---|
| 606 | ) |
---|
| 607 | |
---|
| 608 | if "%DIRhightORNOT%" == "o" ( |
---|
| 609 | if "%DIMhdORNOT%" == "o" ( |
---|
| 610 | for /f %%a in ('type "%sousrepTXT%"') do "%nconvertEXE%" -q %Qhd% %DPI% -out jpeg -o "%DIRsortie%\%%a\pwg_high\%%.jpg" %resize% -resize %DIMhd% %DIMhd% "%DIRsource%\%%a\*.jpg" |
---|
| 611 | ) else ( |
---|
| 612 | for /f %%a in ('type "%sousrepTXT%"') do xcopy "%DIRsource%\%%a\*.jpg" "%DIRsortie%\%%a\pwg_high\" /f /y> nul |
---|
| 613 | ) |
---|
| 614 | ) |
---|
| 615 | |
---|
| 616 | if "%debug%" == "2" ( |
---|
| 617 | echo i'm here :et300 |
---|
| 618 | pause |
---|
| 619 | ) |
---|
| 620 | |
---|
| 621 | :et400 |
---|
| 622 | rem Titre de la fenêtre |
---|
| 623 | set /a x=%x%+1 |
---|
| 624 | set etape= *** Etape %x% sur %y% *** |
---|
| 625 | title %titre%%etape% |
---|
| 626 | cls |
---|
| 627 | rem Edition des images en moyenne qualité |
---|
| 628 | if "%DIRhightORNOT%" == "o" ( |
---|
| 629 | "%nconvertEXE%" -q %Qnormal% %DPI% -out jpeg -o "%DIRsortie%\%%.jpg" %resize% -resize %DIMnormal% %DIMnormal% "%DIRsortie%\pwg_high\*.jpg" |
---|
| 630 | ) else ( |
---|
| 631 | "%nconvertEXE%" -q %Qnormal% %DPI% -out jpeg -o "%DIRsortie%\%%.jpg" %resize% -resize %DIMnormal% %DIMnormal% "%DIRsource%\*.jpg" |
---|
| 632 | ) |
---|
| 633 | |
---|
| 634 | if "%DIRhightORNOT%" == "o" ( |
---|
| 635 | for /f %%a in ('type "%sousrepTXT%"') do "%nconvertEXE%" -q %Qnormal% %DPI% -out jpeg -o "%DIRsortie%\%%a\%%.jpg" %resize% -resize %DIMnormal% %DIMnormal% "%DIRsortie%\%%a\pwg_high\*.jpg" |
---|
| 636 | ) else ( |
---|
| 637 | for /f %%a in ('type "%sousrepTXT%"') do "%nconvertEXE%" -q %Qnormal% %DPI% -out jpeg -o "%DIRsortie%\%%a\%%.jpg" %resize% -resize %DIMnormal% %DIMnormal% "%DIRsource%\%%a\*.jpg" |
---|
| 638 | ) |
---|
| 639 | |
---|
| 640 | if "%debug%" == "2" ( |
---|
| 641 | echo i'm here :et400 |
---|
| 642 | pause |
---|
| 643 | ) |
---|
| 644 | |
---|
| 645 | :et500 |
---|
| 646 | rem Titre de la fenêtre |
---|
| 647 | set /a x=%x%+1 |
---|
| 648 | set etape= *** Etape %x% sur %y% *** |
---|
| 649 | title %titre%%etape% |
---|
| 650 | cls |
---|
| 651 | rem Création des vignettes, toujours sur le même principe qu'à l'étape 1 et 2 |
---|
| 652 | rem Il n'y pas de d'ajout de la mention en filigranne. |
---|
| 653 | rem Supression des meta-données |
---|
| 654 | if "%DIRhightORNOT%" == "o" ( |
---|
| 655 | "%nconvertEXE%" -rmeta -rexifthumb -out jpeg -o "%DIRsortie%\thumbnail\%prefixe_mini%%%.jpg" %resize% -resize %DIMthumbnail% %DIMthumbnail% "%DIRsortie%\pwg_high\*.jpg" |
---|
| 656 | ) else ( |
---|
| 657 | "%nconvertEXE%" -rmeta -rexifthumb -out jpeg -o "%DIRsortie%\thumbnail\%prefixe_mini%%%.jpg" %resize% -resize %DIMthumbnail% %DIMthumbnail% "%DIRsortie%\*.jpg" |
---|
| 658 | ) |
---|
| 659 | |
---|
| 660 | if "%DIRhightORNOT%" == "o" ( |
---|
| 661 | for /f %%a in (%sousrepTXT%) do ( |
---|
| 662 | "%nconvertEXE%" -rmeta -rexifthumb -out jpeg -o "%DIRsortie%\%%a\thumbnail\%prefixe_mini%%%.jpg" %resize% -resize %DIMthumbnail% %DIMthumbnail% "%DIRsortie%\%%a\pwg_high\*.jpg" |
---|
| 663 | ) |
---|
| 664 | ) else ( |
---|
| 665 | for /f %%a in (%sousrepTXT%) do ( |
---|
| 666 | "%nconvertEXE%" -rmeta -rexifthumb -out jpeg -o "%DIRsortie%\%%a\thumbnail\%prefixe_mini%%%.jpg" %resize% -resize %DIMthumbnail% %DIMthumbnail% "%DIRsortie%\%%a\*.jpg" |
---|
| 667 | ) |
---|
| 668 | ) |
---|
| 669 | |
---|
| 670 | if "%debug%" == "2" ( |
---|
| 671 | echo i'm here :et500 |
---|
| 672 | pause |
---|
| 673 | ) |
---|
| 674 | |
---|
| 675 | :et600 |
---|
| 676 | rem Titre de la fenêtre |
---|
| 677 | set /a x=%x%+1 |
---|
| 678 | set etape= *** Etape %x% sur %y% *** |
---|
| 679 | title %titre%%etape% |
---|
| 680 | cls |
---|
| 681 | rem Adjonction du texte (filigranne) (copyright) |
---|
| 682 | if "%copyORNOT%" == "n" goto et700 |
---|
| 683 | if "%DIRhightORNOT%" == "o" ( |
---|
| 684 | if "%DIMhdORNOT%" == "o" ( |
---|
| 685 | "%nconvertEXE%" "%texteHD%" "%DIRsortie%\pwg_high\*.jpg" |
---|
| 686 | ) |
---|
| 687 | ) |
---|
| 688 | |
---|
| 689 | if "%DIRhightORNOT%" == "o" ( |
---|
| 690 | if "%DIMhdORNOT%" == "o" ( |
---|
| 691 | for /f %%a in ('type "%sousrepTXT%"') do "%nconvertEXE%" "%texteHD%" "%DIRsortie%\%%a\pwg_high\*.jpg" |
---|
| 692 | ) |
---|
| 693 | ) |
---|
| 694 | |
---|
| 695 | "%nconvertEXE%" "%texteN1%" "%DIRsortie%\*.jpg" |
---|
| 696 | for /f %%a in ('type "%sousrepTXT%"') do "%nconvertEXE%" "%texteN1%" "%DIRsortie%\%%a\*.jpg" |
---|
| 697 | |
---|
| 698 | if "%debug%" == "2" ( |
---|
| 699 | echo i'm here :et600 |
---|
| 700 | pause |
---|
| 701 | ) |
---|
| 702 | |
---|
| 703 | :et700 |
---|
| 704 | rem Titre de la fenêtre |
---|
| 705 | set /a x=%x%+1 |
---|
| 706 | set etape= *** Etape %x% sur %y% *** |
---|
| 707 | title %titre%%etape% |
---|
| 708 | cls |
---|
| 709 | rem Suppression des dossiers vides |
---|
| 710 | dir "%DIRsortie%" /AD /B /S> "%sortieTXT%" |
---|
| 711 | sort /r "%sortieTXT%"> "%supTXT%" |
---|
| 712 | for /f %%a in ('type "%supTXT%"') do if not exist "%%a\*.*" rmdir "%%a" |
---|
| 713 | rem Copie du fichier %indexPHP% vers les dossiers spécifiés |
---|
| 714 | dir "%DIRsortie%" /AD /B /S> "%sortieNEWTXT%" |
---|
| 715 | xcopy "%indexPHP%" "%DIRsortie%\" /f /y> nul |
---|
| 716 | for /f %%a in ('type "%sortieNEWTXT%"') do xcopy "%indexPHP%" "%%a\" /f /y> nul |
---|
| 717 | |
---|
| 718 | if "%debug%" == "2" ( |
---|
| 719 | echo i'm here :et700 |
---|
| 720 | pause |
---|
| 721 | ) |
---|
| 722 | |
---|
| 723 | :modulesB |
---|
| 724 | cls |
---|
| 725 | rem Lancement des modules qui agissent sur les photos dans le répertoire de sortie (DIRsortie). |
---|
| 726 | rem Stop le chronographe si déjà lancé. |
---|
| 727 | taskList | findstr /c:FreeWatch.exe |
---|
| 728 | if "%ERRORLEVEL%" == "0" start composants\FreeWatch.exe /stop |
---|
| 729 | cls |
---|
| 730 | echo. |
---|
| 731 | echo. |
---|
| 732 | echo En attente des modules... |
---|
| 733 | echo. |
---|
| 734 | |
---|
| 735 | if defined module11 call %module11% |
---|
| 736 | if defined module12 call %module12% |
---|
| 737 | if defined module13 call %module13% |
---|
| 738 | if defined module14 call %module14% |
---|
| 739 | if defined module15 call %module15% |
---|
| 740 | if defined module16 call %module16% |
---|
| 741 | if defined module17 call %module17% |
---|
| 742 | if defined module18 call %module18% |
---|
| 743 | if defined module19 call %module19% |
---|
| 744 | |
---|
| 745 | color 07 |
---|
| 746 | |
---|
| 747 | if "%debug%" == "2" ( |
---|
| 748 | echo i'm here :modulesB |
---|
| 749 | pause |
---|
| 750 | ) |
---|
| 751 | |
---|
| 752 | cls |
---|
| 753 | |
---|
| 754 | :et800 |
---|
| 755 | rem Stop le chronographe si déjà lancé. |
---|
| 756 | taskList | findstr /c:FreeWatch.exe |
---|
| 757 | if "%ERRORLEVEL%" == "0" start composants\FreeWatch.exe /stop |
---|
| 758 | goto :sortie |
---|
| 759 | |
---|
| 760 | if "%debug%" == "2" ( |
---|
| 761 | echo i'm here :et800 |
---|
| 762 | pause |
---|
| 763 | ) |
---|
| 764 | |
---|
| 765 | :sortie |
---|
| 766 | rem Fin du script |
---|
| 767 | cls |
---|
| 768 | rem Ouverture consitionnelle du dossier de sortie |
---|
| 769 | if "%openafterORNOT%" == "o" explorer "%DIRsortie%" |
---|
| 770 | color 70 |
---|
| 771 | if "%logoORNOT%" == "o" call "%logoBAT%" |
---|
| 772 | exit |
---|
| 773 | |
---|
| 774 | :bleme |
---|
| 775 | rundll32 user32.dll,MessageBeep |
---|
| 776 | rem Erreurs |
---|
| 777 | set nnn=nnn |
---|
| 778 | for /L %%d in (0,1,199) do if defined merror%%d set cerror1=1 |
---|
| 779 | for /L %%e in (200,1,299) do if defined merror%%e set cerror5=1 |
---|
| 780 | |
---|
| 781 | color C0 |
---|
| 782 | cls |
---|
| 783 | echo /----------------------------------------------------------------------------\ |
---|
| 784 | echo I I |
---|
| 785 | echo I I |
---|
| 786 | echo I *** ATTENTION *** I |
---|
| 787 | echo I I |
---|
| 788 | echo I I |
---|
| 789 | echo \----------------------------------------------------------------------------/ |
---|
| 790 | echo. |
---|
| 791 | echo !!! INTERUPSION DU PROCESSUS !!! |
---|
| 792 | echo. |
---|
| 793 | echo Aucune modifiaction n'a t ffectue |
---|
| 794 | echo. |
---|
| 795 | echo. |
---|
| 796 | if defined merror0 echo %merror0% & echo. |
---|
| 797 | if defined cerror1 echo Liste des eurreurs fatales: & echo. |
---|
| 798 | for /L %%d in (0,1,199) do if defined merror%%d (echo nnn %%merror%%d%% zz nnn.)>"%DIRtempo%\blemeA.bat" |
---|
| 799 | if exist "%DIRtempo%\blemeA.bat" ( |
---|
| 800 | "%switchEXE%" "%DIRtempo%\blemeA.bat" "nnn" "echo" |
---|
| 801 | "%switchEXE%" "%DIRtempo%\blemeA.bat" "zz" "&" |
---|
| 802 | call "%DIRtempo%\blemeA.bat" |
---|
| 803 | if "%debug%" == "0" del "%DIRtempo%\blemeA.bat"> nul |
---|
| 804 | ) |
---|
| 805 | if defined cerror5 ( |
---|
| 806 | echo Liste des erreurs trouves dans le fichier "Setup.txt". |
---|
| 807 | echo. |
---|
| 808 | echo Merci de les corriger. |
---|
| 809 | echo. |
---|
| 810 | echo. |
---|
| 811 | echo. |
---|
| 812 | echo. |
---|
| 813 | echo. |
---|
| 814 | ) |
---|
| 815 | for /L %%d in (199,1,299) do if defined merror%%d (echo nnn %%merror%%d%% zz nnn.)>"%DIRtempo%\blemeB.bat" |
---|
| 816 | if exist "%DIRtempo%\blemeB.bat" ( |
---|
| 817 | "%switchEXE%" "%DIRtempo%\blemeB.bat" "nnn" "echo" |
---|
| 818 | "%switchEXE%" "%DIRtempo%\blemeB.bat" "zz" "&" |
---|
| 819 | call "%DIRtempo%\blemeB.bat" |
---|
| 820 | if "%debug%" == "0" del "%DIRtempo%\blemeB.bat"> nul |
---|
| 821 | ) |
---|
| 822 | echo. |
---|
| 823 | if defined cerror1 ( |
---|
| 824 | echo ******************************************* |
---|
| 825 | echo * Veuillez rinstaller l'application. * |
---|
| 826 | echo ******************************************* |
---|
| 827 | ) |
---|
| 828 | echo. |
---|
| 829 | echo. |
---|
| 830 | echo. |
---|
| 831 | echo. |
---|
| 832 | echo !!! FIN DU PROCESSUS !!! |
---|
| 833 | echo. |
---|
| 834 | echo. |
---|
| 835 | echo. |
---|
| 836 | echo. |
---|
| 837 | echo. |
---|
| 838 | echo. |
---|
| 839 | echo. |
---|
| 840 | pause |
---|
| 841 | |
---|
| 842 | rem ISuppresion des fichiers temporaires |
---|
| 843 | if "%debug%" NEQ "0" ( |
---|
| 844 | if exist "%DIRtempo%" del "%DIRtempo%" /s /q >nul |
---|
| 845 | if not exist "%DIRtempo%" mkdir "%DIRtempo%" >nul |
---|
| 846 | ) |
---|
| 847 | exit |
---|
| 848 | |
---|
| 849 | :bleme2 |
---|
| 850 | rem Erreurs non bloquante. Le script sera relancé. |
---|
| 851 | cls |
---|
| 852 | rundll32 user32.dll,MessageBeep |
---|
| 853 | color C0 |
---|
| 854 | cls |
---|
| 855 | echo /----------------------------------------------------------------------------\ |
---|
| 856 | echo I I |
---|
| 857 | echo I I |
---|
| 858 | echo I *** ATTENTION *** I |
---|
| 859 | echo I I |
---|
| 860 | echo I I |
---|
| 861 | echo \----------------------------------------------------------------------------/ |
---|
| 862 | echo. |
---|
| 863 | echo !!! INTERUPSION DU PROCESSUS !!! |
---|
| 864 | echo. |
---|
| 865 | echo Aucune modifiaction n'a t ffectue |
---|
| 866 | echo. |
---|
| 867 | echo. |
---|
| 868 | if defined merror0 echo %merror0% & echo. |
---|
| 869 | if defined merror0 start explorer %DIRsortie% |
---|
| 870 | echo. |
---|
| 871 | echo. |
---|
| 872 | echo. |
---|
| 873 | echo. |
---|
| 874 | echo. |
---|
| 875 | echo. |
---|
| 876 | echo. |
---|
| 877 | echo. |
---|
| 878 | ping -n 3 127.0.0.1 > NUL |
---|
| 879 | echo Le rpertoire de sortie viens de souvrir. A vous de le vider... |
---|
| 880 | echo. |
---|
| 881 | echo. |
---|
| 882 | echo. |
---|
| 883 | echo. |
---|
| 884 | echo. |
---|
| 885 | echo. |
---|
| 886 | echo. |
---|
| 887 | echo. |
---|
| 888 | echo. |
---|
| 889 | echo. |
---|
| 890 | echo. |
---|
| 891 | echo Appuez sur une touche pour relancer Batch_Optimisateur. |
---|
| 892 | echo. |
---|
| 893 | echo. |
---|
| 894 | echo. |
---|
| 895 | echo. |
---|
| 896 | echo. |
---|
| 897 | echo. |
---|
| 898 | pause> nul |
---|
| 899 | set merror0= |
---|
| 900 | color F1 |
---|
| 901 | goto :P0 |
---|
| 902 | |
---|
| 903 | :header |
---|
| 904 | cls |
---|
| 905 | echo. |
---|
| 906 | echo %title% |
---|
| 907 | echo /*****************************************\ /********************************\ |
---|
| 908 | echo * *I*H ID HHHHHHHHHHHHHHHHHHHHHHHHHHH* |
---|
| 909 | echo * BATCH OPTIMISATEUR *I*HHffffffffHHHiiHHHHxxHHHHHHxxHHH* |
---|
| 910 | echo * pour Piwigo (PWG) *I*HHffffffffHHHiiHHHHxxHHHHHHxxHHH* |
---|
| 911 | echo * www.piwigo.org *I*HHffHHHHHHHHHiiHHHHHxxHHHHxxHHHH* |
---|
| 912 | echo * *I*HHfffffHHHHHHiiHHHHHHxxHHxxHHHHH* |
---|
| 913 | echo *-----------------------------------------*-*HHfffffHHHHHHiiHHHHHHHHxxHHHHHHH* |
---|
| 914 | echo * *I*HHffHHHHHHHHHiiHHHHHHxxHHxxHHHHH* |
---|
| 915 | echo * Script ralis par MOREAU Julien *I*HHffHHHHHHHHHiiHHHHHxxHHHHxxHHHH* |
---|
| 916 | echo * quelleheureestilsvp@yahoo.fr *I*HHffHHHHHHHHHiiHHHHxxHHHHHHxxHHH* |
---|
| 917 | echo * *I*HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH* |
---|
| 918 | echo \*****************************************/ \********************************/ |
---|
| 919 | echo. |
---|
| 920 | echo. |
---|
| 921 | if "%debug%" NEQ "0" ( |
---|
| 922 | echo /****************************************************************************\ |
---|
| 923 | echo * * |
---|
| 924 | echo * MODE DEBUGAGE ACTIF * |
---|
| 925 | echo * * |
---|
| 926 | echo \****************************************************************************/ |
---|
| 927 | echo. |
---|
| 928 | ) else ( |
---|
| 929 | echo. |
---|
| 930 | echo. |
---|
| 931 | echo. |
---|
| 932 | ) |
---|
| 933 | goto :eof |
---|