0

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?

Rıdvan Çetin
  • 183
  • 5
  • 16

1 Answers1

0

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
Matt Williamson
  • 6,947
  • 1
  • 23
  • 36