Can forfiles
search multiple drives in the same command and create a text file of results? I have the following that works to show me the results in command prompt but what I really need is a .txt
file that displays all the matches.
Also, if there was a way of searching C:\
and D:\
in the same instance?
forfiles /p c:\ /s /m XYZ*.* /d -15 /c "cmd /c echo @file is a txt file and older then 15 days
I have adjusted the line so that it outputs a text file in the folder that command prompt is opening from so that part is done but I am still trying to figure out how to scan the C:
and the D:
in the same command. The new line is:
forfiles /p c:\ /s /m XYZ*.* /d -15 /c "cmd /c echo @path" >outputC.txt