**Issue:**

I need a piece of code that will go through all files in a folder and locate broken file masks.

I basically want to go out a get a count from each data piece within each file mask and if the file mask does NOT return 4 data pieces (Last Name\_First Name\_Last4 SSN\_Date of Hire), then I want to move that broken file into another folder.

**I only need help with:**

Code that will “count” all the data pieces separated by the underscores ( \_ ). 

 I cannot just simply get a character count because obviously first and last names are unique. So I would imagine I will have to count each data piece.

**Summary:**

I’m building a program that will fix file mask names for .zip files. If these zip files do not match the below file mask(name) EXACTLY then they cannot be processed through our systems. 

They must have the 4 pieces of data listed in the name in the exact order. Each data piece is ALWAYS divided by an underscore ( \_ ).

**File Mask Format:**
Last Name\_First Name\_Last4 SSN\_Date of Hire

**Example:**
Smith\_John\_1234\_06202019

Typically the issue I need to fix for is when the LAST 4 SSN is missing from the file mask, so the broken file mask will look like:
Smith\_John\_\_06202019

**the “1234” is missing from the file mask(name). HOWEVER, the underscore is still there.**