Created
November 18, 2016 18:28
-
-
Save matijagrcic/c28319b22e2ffffad366c3e00ae7b5aa to your computer and use it in GitHub Desktop.
Batch convert webp to png
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Download dwebp (WebP decoder tool) https://developers.google.com/speed/webp/download | |
#Run | |
for %f in (*.webp) do dwebp.exe "%f" -o "%~nf.png" |
is there a way to remove the original files automatically?
for %%f in (*.webp) do ( dwebp.exe -o "%%~nf.png" "%%f" del "%%f" )
@echo off
setlocal
REM Convert all WEBP files to PNG and then delete the WEBP files
for %%f in (*.webp) do (
echo Converting %%f...
dwebp.exe "%%f" -o "%%~nf.png"
if errorlevel 1 (
echo Failed to convert %%f
) else (
del "%%f"
echo Deleted %%f
)
)
echo Conversion complete.
pause
done and all the images disappeared...
always keep a backup of your images
just used a program i got instead. was easy to get all the images back due to the original way i got them using yt-dlp. still confused why it deleted them all though.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
little batch file I made for the community here:
https://gist.github.com/spenceryonce/e849800e7d7fcbb8645431f7f8abaa81