i'm sorry i have missed this out
$location variable is a reference to the location of the file on the server
could be
$location="C:\Data\dbName.bak" to upload the daily backup file
or
$location="C:\Archives\"+$b to upload the archive zip of the backup file
thank you