I think this command should do that:
for /R C:\ %%f in (???????.txt) do (
That code lists all base file names width 7 or smaller
EDIT - I missed the /S option in the original request, so I need to modify the code below
Here a pure batch solution using nothing but native commands.
Since DIR cannot limit its output to files with base name of exactly 7 characters, you cannot use DIR to produce the wide format. You will need to use some type of loop to create the wide format.
You can use any number of techniques to check each file (one per line) to see if it matches your requirements.
I would use
dir /b *.txt | findstr "^...........$"
Then you need to use a loop to get the results in your wide format.
You need to decide how wide the line is, and how many spaces between each file. I'm going to assume a width of 80 with 5 spaces between columns, so that allows 5 columns.
It would be nice to avoid using delayed expansion so that you don't have to worry about FOR variable expansion corrupting names containing exclamation points. I'm going to use some math tricks so that neither delayed expansion nor a CALL is needed to test the number of columns printed so far. If there is no division by 0, then the "success" code is executed, else the "error" code is excecuted.
The code uses the <NUL SET /P trick to print text without a new line. The trick sets ERRORLEVEL to an error, so I use VER to reset the ERRORLEVEL to 0 so that it doesn't fall into the "error" section.
for /f "eol=: delims=" %%f in ('dir /b *.txt ^| findstr "^...........$"') do (
2>nul set /a "n=n+1,1/(n%%5)" && (<nul set /p "=%%f " & ver >nul) || (echo %%f)
2>nul set /a "1/(n%%5)" && (echo()