Get full path of the files in PowerShell

后端 未结 14 2204
挽巷
挽巷 2020-12-02 06:21

I need to get all the files including the files present in the subfolders that belong to a particular type.

I am doing something like this, using Get-ChildItem:

14条回答
  •  南笙
    南笙 (楼主)
    2020-12-02 07:14

    I used this line command to search ".xlm" files in "C:\Temp" and the result print fullname path in file "result.txt":

    (Get-ChildItem "C:\Temp" -Recurse | where {$_.extension -eq ".xml"} ).fullname > result.txt 
    

    In my tests, this syntax works beautiful for me.

提交回复
热议问题