sflbuzzman
asked on
Powershell file query, sort, output
Have a very basic Powershell request, but my experience is even more basic. Please Humor me...
I need to Write a Windows PowerShell script that will perform the following functions:
1. Search the computer for files ending with a .doc, .docx, .xls, or .xlsx file extension.
2. Output the filenames and sizes (in groups by file extension) to a text file named “File_Summary.txt”.
3. The output should also conclude with a total of the number of files and total file size for each file extension.
Here is as far as I can get:
dir -recurse -include *.docx, *.xlsx c: | select-object Length, name | sort-Object extension
I need to Write a Windows PowerShell script that will perform the following functions:
1. Search the computer for files ending with a .doc, .docx, .xls, or .xlsx file extension.
2. Output the filenames and sizes (in groups by file extension) to a text file named “File_Summary.txt”.
3. The output should also conclude with a total of the number of files and total file size for each file extension.
Here is as far as I can get:
dir -recurse -include *.docx, *.xlsx c: | select-object Length, name | sort-Object extension
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks