删除 .txt 文件中的文本并将其替换为 .BAT 文件

Remove and replace text in .txt file with .BAT file

现在我有一个非常简单的 DIR .BAT 文件来列出 XLS 文件。我需要从列表中删除文件扩展名和不需要的部分。最简单的方法是什么?

现在我只有这个:

DIR /b /on *.XLS > LIST.TXT

这给了我一个输出:

00000+00-f.xls
00960+83-f.xls
01911+82-f.xls
01939+53-f.xls
02225+79-f.xls

但我想将其重新格式化为

00000+00
00960+83
01911+82
01939+53
02225+79

关于如何仅使用一个 .BAT 文件的任何想法?

@echo off
(for /f "delims=-" %%a in ('DIR /b /a-d /on *.XLS') do echo %%a)>file.txt