简体   繁体   English

批量列出文件夹中的所有.xls文件

[英]batch list all .xls files in folder

I have following batch files to list all the excel files in my folder: 我有以下批处理文件来列出文件夹中的所有excel文件:

for /r %%i In (*.xls) DO echo %%i

However, this will also include all excel files in subfolders of my current folder. 但是,这还将包括我当前文件夹的子文件夹中的所有excel文件。 How can I prevent that? 我该如何预防? I only want the files in the folder itself, not the subfolder. 我只希望文件夹本身中的文件,而不是子文件夹中的文件。

PFF,愚蠢的问题,愚蠢的答案:只需删除/ r

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用批处理删除文件夹中除列表中的文件以外的所有文件 - Delete all files in folder except file in list using batch 批处理-删除文件夹和所有文件 - Batch - Delete folder and all files 批量将所有文件移动到可变文件夹名称 - Batch moving all files to variable folder name 使用循环批量(xcopy所有文件到文件夹) - Batch (xcopy all files to folder) with loop 如何在批处理文件中使用for循环列出文件夹中所有文件和目录的名称 - How to list the names of all the files and directories in a folder using for loop in a batch file 如何使用批处理文件以编号顺序列出文件夹中特定扩展名的所有文件 - How to list all files of specific extensions inside a folder with numbering order using batch file 批处理文件以计算文件夹中的所有文件和子文件夹文件,并使用批处理文件以文件夹名称写入输出文件 - batch file to count all files in a folder and subfolder files and write output file in folder name using batch file 批处理文件列出Windows 7中目录中的所有文件 - Batch file to list all files in a dir in windows 7 列出所有文件的合并大小,并批量列出 - List combined size of all files with type in batch 批处理文件:如何将所有 .doc 文件备份到文件夹 - Batch-file: how to backup all .doc files to a folder
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM