Get full path of the files in PowerShell

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Get full path of the files in PowerShell

Message par ForumBot »

Get full path of the files in PowerShell
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Get full path of the files in PowerShell

Message par ForumBot »

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
}

```
Répondre

Revenir à « PowerShell »