@echo off
SETLOCAL
:: Width reserved for showing filenames
set WIDTH=40
:START
:: For every file: show first %WIDT% characters of filename, ":" (we need this later on), description
:: Select the file whose description you want to edit
for /a:-d %x in (*) echo %@left[%WIDTH%,%x%@repeat[ ,%WIDTH%]] : %@descript["%x"] |! set THIS=%@word[":",0,%@select[con:,1,1,100,100,Titel]]
if "%THIS%" == "" quit
set THIS="%THIS%"
:: If The filename is too long to fit on the screen,
:: we have to find out what it is /what they are (hence %THIS%*)
:: Add 2 to the length for the quotes
IF %@LEN[%THIS%] == %@eval[%WIDTH% + 2] set THIS=%@expand[%THIS%*]
:: In case of multiple files: Show warning and edit the description of all of them
IF %@words[" ",%THIS%] GT 1 MSGBOX /W OK "Warning" Multiple files match this pattern ..
for %%x in (%THIS%) DO (
:: Get current description, ask for new and update
set NEW=%@descript[%%x]
querybox /E %%x Description : %%NEW
DESCRIBE %%x /D"%NEW%"
unset NEW
)
unset THIS
goto :START