# Batch File issues

**URL:** <https://forum.kirupa.com/t/batch-file-issues/239216>\
**Category:** Uncategorized\
**Created:** [September 19, 2007, 5:05pm UTC](https://forum.kirupa.com/t/batch-file-issues/239216 "2007-09-19T17:05:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chacelp](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chacelp/32/7336_2.png) [@chacelp](https://forum.kirupa.com/u/chacelp)\
**Post date:** [September 19, 2007, 5:05pm UTC](https://forum.kirupa.com/t/batch-file-issues/239216/1 "2007-09-19T17:05:19Z")

</div>

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:

```auto
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??
