Experimental/Research-RowCountOfAllTables.ps1

1
2
3
4
5
6
7
8
9
10
11
12
13
<#
.SYNOPSIS
Does a row count of all tables in a folder.
 
#>


param (
    $Path 
)

Get-ChildItem -path $Path -Filter *.dbf | ForEach-Object{
        Invoke-foxproQuery -DataSource $Path -Query "SELECT '$($_.Basename)' AS TableName, COUNT(*) AS COUNT_OfRows FROM $($_.Basename)" 
    }