I have a folder with three files and want the equivalent of dir /s /b in PowerShell. How do I do that?
For example, if the folder name is temp3
Just to enforce, what Joey said:
gci -r -filter *.log | % fullname
This works to find files like dir /s/b *.log does.
(dir -r *.log).FullName works as well
Execute this once in your powershell shell, to enable a dirsb *.log command:
function global:dirsb {
param ([Parameter(Mandatory=$true)][string]$fileFilter)
gci -r -filter $fileFilter | % fullname
}
or add it to your profile: PS> notepad $profile