So I am not sure if anyone can help me here or not, so here goes. I have a basic .bat file that when executed will delete the last log file, then proceed to loop through a directory for files with a ‘*_Processes.xml’ extension. My little batch file looks like this:
REM This Batch file will search each file in the directory provided and find reference to the item that is listed in quotes
del "C:\PIDResults.txt"
FOR /R [\\My\Network\Directory\With\Logs](file://\\My\Network\Directory\With\Logs) %%G IN (*_Processes.xml) DO FINDSTR /M "<PID>6080</PID>" %%G >> C:\PIDResults.txt
My question is how can I get it to omit a certain folder from the search? In this example I have another subdirectory with “Archived Logs” in it that is massive, almost 6gb and growing daily. Is there some way to say something like:
if directory_name == “Archive” then skip
else do find
fi
Anything??