문제

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