|
This script will let you drag a folder onto it and it will convert all .heic files in it to .jpg. It will not delete the original files. It will not convert files in subdirectories, only the base folder.
First, you will need ImageMagick on your computer. I recommend you download the portable version from here. An example is the file "ImageMagick-7.1.2-12-portable-Q16-x64.7z", although the version number may change when you use this. https://imagemagick.org/script/download.php#gsc.tab=0 Extract those files somewhere, and in the script below, change the following path to a valid path for this file "C:\Tools\Utils\ImageMagick\magick.exe". Save this code as a .bat file, then just drag and drop a folder on the .bat file and it will process all files in it. Copy to Clipboard
@echo off
setlocal enabledelayedexpansion
:: Check if a folder was dragged onto the script
if "%~1"=="" (
echo Please drag and drop a folder onto this batch file.
pause
exit /b
)
:: Change directory to the dropped folder
cd /d "%~1"
echo Converting HEIC files in: %cd%
echo ---------------------------------------
:: Loop through all .heic files (case insensitive)
for %%f in (*.heic) do (
echo Converting: %%f
C:\Tools\Utils\ImageMagick\magick.exe "%%f" "%%~nf.jpg"
)
echo ---------------------------------------
echo Done!
pause
|