Mes fichiers sont:Comment créer des fichiers par2 multipar ligne de commande?
/aaaaa/11111.rar
/bbbbb/22222.rar
/cccccc/33333.rar
/ddddd/44444.rar
Je veux créer des fichiers par ...
/aaaaaa/11111.par2
/bbbbbb/22222.par2
/ccccccc/33333.par2
/dddddd/44444.par2
Comment puis-je changer le nom par?
J'ai essayé ce code:
@ECHO OFF
REM this command script requires Windows 2000/XP
SETLOCAL
SET par2_path="path of par2j.exe"
:GetFilePath
SET target_folder=%1
REM check input path
IF "%~1"=="" GOTO End
IF NOT EXIST "%~1" GOTO NextFile
IF NOT "%~z1"=="0" GOTO NextFile
REM invoke PAR2 client
ECHO create PAR files for %1
%par2_path% c /sm2048 /rr20 /rd1 /rf3 "%~1\%~n1.par2" *
IF ERRORLEVEL 1 GOTO End
:NextFile
SHIFT
GOTO GetFilePath
:End
ENDLOCAL
Et ça marche, mais il y a un problème: fichiers de pair rebaptisés nom dossier ...
Il n'est pas clair pour votre description ou votre code quel est exactement le problème. Cependant ''% ~ 1 \% ~ n1.par2 "' est ce qui définit le nom du fichier de sortie. – wOxxOm
merci mais je sais mais comment vérifier% ~ 2 fichier? – JesWhite
Comment exécutez-vous ce fichier batch? Afficher un exemple de ligne de commande exacte. – wOxxOm