No one seems to ask this simple question, so I will.
My PowerShell script file is located: C:/this-folder/that-folder/another-folder/powershell-file.ps1
C:/this-folder/that-folder/another-folder/powershell-file.ps1
try this command in your script:
Split-Path -parent $MyInvocation.MyCommand.Definition