• It was at a previous shop so I no longer have access to the code but basically it used a call to Get-Content that limited the rows to "the first one" to get the first line of the file, i.e. the column headers. I would store the first line of each data file to a new file for safe keeping. Then I would compare the new file's first line to the first line from the data file I received before it, and basically that was just doing another Get-Content to get the headers from the last file and an equality check with this-time's headers. If they did not match I would stop the process so someone could manually intervene because it meant the file format changed.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato