Monday, December 2, 2013

PowerShell - list all documents under directory

Few days ago i had to read some docs in solution, so i decided to write simple script to list all *.doc and *.docx files under specyfic directory. Here it is: # View all text files $Dir = get-childitem E:\ClientSolution -recurse # $Dir |get-member $List = $Dir | where {($_.extension -eq ".doc") -or ($_.extension -eq ".docx")} $List | format-table fullname

No comments:

Post a Comment