@echo off chcp 65001 >nul setlocal title Creation des .txt VR rem Dossier a traiter : celui glisse sur le .bat, sinon celui ou se trouve le .bat set "DOSSIER=%~1" if "%DOSSIER%"=="" set "DOSSIER=%~dp0" echo. echo Creation des fichiers .txt VR (Samsung Gear VR) echo Dossier : %DOSSIER% (sous-dossiers inclus) echo Les videos qui ont deja un .txt ne sont pas touchees. echo. echo Quel format pour les videos ? echo 1 = Ecran 2D echo 2 = 3D cote a cote (3DLR) echo 3 = 3D cote a cote plein ecran (3DLRF) echo 4 = 3D haut/bas (3DTB) echo 5 = 3D haut/bas plein ecran (3DTBF) echo. choice /c 12345 /n /m " Ton choix (1-5) : " if errorlevel 5 (set "FMT=3DTBF") else if errorlevel 4 (set "FMT=3DTB") else if errorlevel 3 (set "FMT=3DLRF") else if errorlevel 2 (set "FMT=3DLR") else (set "FMT=2D") echo. echo Format choisi : %FMT% echo. set /a NB=0 for /r "%DOSSIER%" %%F in (*.mp4 *.mkv *.mov *.avi *.m4v *.webm *.wmv *.ts *.mts *.m2ts) do ( if not exist "%%~dpnF.txt" ( > "%%~dpnF.txt" ( echo { echo "title": "%%~nF", echo "format": "%FMT%", echo "category": "", echo "theater": "" echo } ) echo + %%~nF.txt set /a NB+=1 ) ) echo. echo Termine : %NB% fichier(s) .txt cree(s). echo. pause