Get full path of the files in PowerShell

Here's a shorter one:

(Get-ChildItem C:\MYDIRECTORY -Recurse).fullname > filename.txt

You can also use Select-Object like so:

Get-ChildItem "C:\WINDOWS\System32" *.txt -Recurse | Select-Object FullName

This should perform much faster than using late filtering:

Get-ChildItem C:\WINDOWS\System32 -Filter *.txt -Recurse | % { $_.FullName }

Add | select FullName to the end of your line above. If you need to actually do something with that afterwards, you might have to pipe it into a foreach loop, like so:

get-childitem "C:\windows\System32" -recurse | where {$_.extension -eq ".txt"} | % {
     Write-Host $_.FullName
}