Massive upload files to SharePoint servers

I have been looking to make using some sort of script the way to make massive upload to a sharePoint server;
I have been finding many using Powershell and I came up with this type of script

param ([String]$spPath, [String]$localPath)

#################################################################################

## Load the SharePoint Snapin so the script can be executed from PowerShell editor
## INTERACTIVE OR AUTOMATIC MODE.

## FOR AUTOMATIC MODE. SET THE VARIABLE BELOW.OTHERWISE PROMPT WOULD REQUEST EACH.

## SET THE NUMBER OF TIME YOU WISH UPLOAD FOR EACH FILES
##$t = "10"

### SET THE REMOTE SHAREPOINT REMOTE LOCATION FOR THE SHARED DOCUMENT
### OR LET THE PROMPT
### EX: $spPath = "http://sharepoint/home/Shared%20Documents/"


#### SET LOCAL PATH OF FILES TO BE UPLOADED.
#### EX: $localPath = "e:\my_files"



##################################################################################


Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
# get the SharePoint path if not specified

$i = 1

if ($spPath -eq "")
{
    Write-Host
	$spPath = Read-Host -Prompt " Please enter the full path for the shared librairy?"
}

if ($t -eq "")
{
    Write-Host
	$t = Read-Host -Prompt " How Many times you wish to upload?"
}

# get the local path if not specified
if ($localPath -eq "")
{
    Write-Host
    $localPath = Read-Host -Prompt " Please enter the full path to the local directory that contains the documents to be uploaded"
}



do {Write-Host $i;$i++

## Define our library name and web url

$LibraryName = $spPath.Substring($spPath.LastIndexOf("/")+1)
$webUrl = $spPath.Substring(0,$spPath.LastIndexOf("/"))

## Define a function to return the destination file name

Function BuildFileName($filename)
{
    "$webUrl/$LibraryName/" + $(split-path -leaf $filename)
}
## Upload all the documents found in the specified location

Write-Host "Uploading all documents from $sourceDocs"
$webClient = New-Object System.Net.WebClient
$webClient.Credentials = [System.Net.CredentialCache]::DefaultCredentials
dir $localPath | % {
    Write-Host "Uploading file from "$localPath": $_" -nonewline
    $fName = BuildFileName $_
    $webClient.UploadFile($fName,"PUT", $_.FullName)
    Write-Host " done" -ForegroundColor Green
    }

}
until ($i -gt $t)