@echo off
setlocal enabledelayedexpansion

:: Set the directory where you want to extract the file name
set "dir=.\"

:: Set the location and name of the output file
set "output_file=.\BIOS_FILE_NAME.txt"

:: If the output file already exists, delete it
if exist "%output_file%" del "%output_file%"

:: Writes the file name in the destination directory to the output file
for %%F in ("%dir%*.bin") do (
    echo %%~nxF>> "%output_file%"
)

echo "The BIOS file name has been extracted to%output_file%."

set "output_file=.\02_Fpt_Shell.nsh"
if exist "%output_file%" del "%output_file%"
for %%F in ("%dir%*.bin") do (
    echo Fpt.efi -f %%~nxF>> "%output_file%"
)
echo FptNsh has been packageed to %output_file%

:: Set the location and name of the output file
set "output_file=.\03_Afu_Shell.nsh"

:: If the output file already exists, delete it
if exist "%output_file%" del "%output_file%"

:: Writes the file name in the destination directory to the output file
for %%F in ("%dir%*.bin") do (
    echo AfuEfix64.efi %%~nxF /P /B /N /K /X /L>> "%output_file%"
)
echo AfuNsh has been packageed to %output_file%
endlocal