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
Вопрос
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