Functions/FileSystem/Find-FilePath.ps1

function Find-FilePath
    {
    PARAM
        (
        [Parameter(Mandatory=$false)]
        [string]
        $StartPath = "C:\",

        [Parameter(Mandatory=$false)]
        [string]
        $Description = "Select a File"
        )

    [Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | Out-Null
    [System.Windows.Forms.Application]::EnableVisualStyles()
    $browse = New-Object System.Windows.Forms.OpenFiledialog
    $browse.initialdirectory = $Startpath
    $browse.title = $Description

    $loop = $true
    while($loop)
        {
        if ($browse.ShowDialog((New-Object System.Windows.Forms.Form -Property @{TopMost = $true })) -eq "OK")
            {
            $loop = $false
            } 
        else
            {
           $res = [System.Windows.Forms.MessageBox]::Show($this, "You clicked Cancel. Would you like to try again or exit?", "Select a location", [System.Windows.Forms.MessageBoxButtons]::RetryCancel)
            if($res -eq "Cancel")
                {
                return
                }
            }
        }
    $browse.filename
    $browse.Dispose()
    }