質問

I wanted to list files for specified Owner and specified Extension.

DIR D:\Folder /S /Q|FIND /i "OWNER" | findstr /m /i "\.mkv$" >> D:\Folder\list.txt

I tried this, its working but its printing the owner name, date,size. All I want the file list. And I couldn't find a way around this. How can I do that?

役に立ちましたか?

解決

Try this:

@echo off
setlocal

set "s=DIR D:\Folder /S /Q^|FIND /i "OWNER" ^|findstr /m /i "\.mkv$""
for /f "Tokens=5,6*" %%a in ('%s%') do >>D:\Folder\list.txt echo %%a %%b %%c
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top