How to decrease the tagsize after deleting coverart

I'm so free and hijack this thread about the padding size in FLAC files, and want to give thanks to Lupercus for his batch file using the commandline tool "metaflac.exe", which I have used as a template.
I wrote an extended version of the batch file, see attachment.

@ECHO OFF

REM ================================================================================
REM Purpose: Change the padding size within all FLAC files in the given folder .
REM The given folder path name can be dropped onto this batch file ...
REM ... or can be set as the first parameter on the command line.
REM This CMD script is an extended version of the CMD script from Mp3tag user "Lupercus, Sep 5 2009, 13:52" .
REM Detlev Dalitz.20140106.
REM ================================================================================
REM Define the fully qualified path to the file "metaflac.exe".

SET METAFLAC="P:\Programs\FLAC\metaflac.exe"
REM Define the padding default size in Bytes.
REM The pad size is allowed to be an integer value in the range from 0 to 16777215.

SET PADSIZE_DEFAULT=2000
REM ================================================================================
ECHO.[%~n]
ECHO.
ECHO.Set padding for all FLAC files in the current folder ...
CD /D "%~f1"
ECHO."%CD%"
IF NOT EXIST ".FLAC" (
ECHO.
ECHO.FLAC files not found.
GOTO END
)
:GET_PADSIZE

ECHO.
SET PADSIZE_INPUT=%PADSIZE_DEFAULT%
SET /P PADSIZE_INPUT=Give padding size in Bytes (default %PADSIZE_DEFAULT%):
SET /A PADSIZE_EVAL=1
%PADSIZE_INPUT%
IF %PADSIZE_EVAL% NEQ %PADSIZE_INPUT% (
ECHO.Enter an integer number in the range ...
ECHO.decimal ...: from 0 to 16777215
ECHO.hexadecimal: from 0 to 0xffffff
ECHO.octal .....: from 00 to 077777777
GOTO GET_PADSIZE
)

ECHO.Set padding to %PADSIZE_EVAL% Bytes.
ECHO.
ECHO.Press [Enter] to continue or [Ctrl+C] to exit.
PAUSE >NUL
ECHO
.
SET COUNT=0
FOR %%f IN ("*.FLAC") DO (
REM ATTRIB -R "%%~nxf"
REM ECHO."%%~nxf"
REM ECHO.%%~ftzaf

SET /A COUNT=!COUNT!+1
ECHO.
ECHO.!COUNT!:
ECHO.Remove padding from ...
DIR /N/4 "%%f"|FIND "%%f"
%METAFLAC% --dont-use-padding --remove --block-type=PADDING "%%~nxf"
IF ERRORLEVEL 1 GOTO ERROR
ECHO.Add padding %PADSIZE_EVAL% Bytes ...
%METAFLAC% --add-padding=%PADSIZE_EVAL% "%%~nxf"
IF ERRORLEVEL 1 GOTO ERROR
DIR /N/4 "%%f"|FIND "%%f"
ECHO.
REM PAUSE

)

ECHO.
ECHO.Ready.
GOTO END
:ERROR

ECHO.
ECHO.Error on reducing padding ... batch process stopped.

:END

ECHO.
PAUSE
EXIT

MetaFlac.SetPadding.cmd.txt (2.25 KB)
For usage remove the extension ".txt" from the filename.

DD.20140106.2356.CET

Note:
This cmd script makes use of "delayed variable expansion".
To use delayed variable expansion it must be enabled.

This can be done using CMD /V:ON /C to start the batch file, ...
or better insert the code line ...
SETLOCAL ENABLEDELAYEDEXPANSION
... inside the batch file.

To make it permanently ...
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"DelayedExpansion"=dword:00000001

DD.20150515.1120.CEST

MetaFlac.SetPadding.cmd.txt (2.25 KB)