[Galaxy S 4 General] timchew:
You can't change the name after the files are formed as that will mess up the md5 value and odin will not load.

By the way, I can't seem to combine two or more files to form a single tar.md5 file. How did you do it? The files just disappear and nothing is left.

I have attached the log file if it helps. I am using windows 10 64 bits.

---------------mkh.mourad batch script

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem run ImgToTar.md5.batch instead of this batch file for creating a log file of the operation.

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem clean directoies from old tar and tar.md5 files

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B *.tar') do del "%G"

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B *.tar.md5') do del "%G"

C:\Users\chewty\Desktop\Flashing\tar-Tool>del "C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles\allfiles.tar.md5"

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem first create a backup files from *.img in the same directory

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B *.img *.bin') do XCOPY /Y "%G" "%G.back" 0<Yes_File

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem rename img files started by recovery to recovery.img and

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem img files started by boot or kernel to boot.img

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B recovery*.img') do REN "%G" recovery.img

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B boot*.img') do REN "%G" boot.img

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B kernel*.img') do REN "%G" boot.img

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B modem*.bin') do REN "%G" modem.bin

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B NON-HLOS*.bin') do REN "%G" NON-HLOS.bin

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem Create the tar file:

C:\Users\chewty\Desktop\Flashing\tar-Tool>SETLOCAL ENABLEDELAYEDEXPANSION

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem // clear previous files.

C:\Users\chewty\Desktop\Flashing\tar-Tool>RMDIR /S /Q AllFiles

C:\Users\chewty\Desktop\Flashing\tar-Tool>MKDIR AllFiles

C:\Users\chewty\Desktop\Flashing\tar-Tool>call set curentDir="C:\Users\chewty\Desktop\Flashing\tar-Tool"

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B *.img *.bin') do (

call cd %~dpG

call !curentDir!\BIN\tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f %~nG.tar %~nxG

xcopy %~nxG !curentDir!\AllFiles\

)

File Not Found

C:\Users\chewty\Desktop\Flashing\tar-Tool>cd !curentDir!

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem Creat a AllInOne Tar file for all img and bin files

C:\Users\chewty\Desktop\Flashing\tar-Tool>cd AllFiles

C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles>call !curentDir!\BIN\ls *.img *.bin 1>allfiles.txt

/BIN/ls: cannot access *.img: No such file or directory

/BIN/ls: cannot access *.bin: No such file or directory

C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles>call !curentDir!\BIN\tar --create --format=gnu -b20 --quoting-style=escape --owner=0 --group=0 --totals --mode=644 -f allfiles.tar -T allfiles.txt

Total bytes written: 10240 (10KiB, 17MiB/s)

C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles>del /Q allfiles.txt

C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles>cd !curentDir!

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem Create the md5 final file:

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B *.tar') do (

call cd %~dpG

call !curentDir!\BIN\md5sum -t %~nxG 1>>%~nxG

call !curentDir!\BIN\mv %~nxG %~nxG.md5

)

C:\Users\chewty\Desktop\Flashing\tar-Tool>(

call cd C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles\

call !curentDir!\BIN\md5sum -t allfiles.tar 1>>allfiles.tar

call !curentDir!\BIN\mv allfiles.tar allfiles.tar.md5

)

C:\Users\chewty\Desktop\Flashing\tar-Tool\AllFiles>cd !curentDir!

C:\Users\chewty\Desktop\Flashing\tar-Tool>rem clean directoies from img and bin files

C:\Users\chewty\Desktop\Flashing\tar-Tool>FOR /F "delims=" %G in ('DIR /S /A:D /B *.img *.bin') do del /Q "%G"

File Not Found

Thanks!