piping a path into Set-Location
im searching file , trying change current working directory path file.
ive tried following:
set-location |get-childitem -recurse |where-object{$_.name -match "filename*"}| select directory
get-childitem -recurse |where-object{$_.name -match "filename*"}| select directory| set-location
neither work. can advise me how directory name get-childitem, without header, , pipe into set-location?
get-childitem -recurse |where-object{$_.name -match "filename*"}| set-location -path {$_.directory}
Windows Server > Windows PowerShell
Comments
Post a Comment