Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9222389
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:49:34+00:00 2026-06-18T03:49:34+00:00

I am trying to put these two scripts together: This one lists all the

  • 0

I am trying to put these two scripts together:

This one lists all the files in all the directories:

dir -recurse | group-object Extension -noelement

And this one lists all the files that were modified after a certain date:

get-childitem –recurse | where-object {$_.lastwritetime -gt “1/13/2008”}

My issue is that the second script outputs a header for every directory:

Mode                LastWriteTime     Length Name                                                                      
----                -------------     ------ ----                                                                      
d----        12/10/2012  11:21 AM            BUDGET                                                                    
d----        12/21/2012  12:38 PM            SPEND DOWN                                                                


    Directory: \\file\property\vt\Environmental Services\BUDGET\SPEND DOWN


Mode                LastWriteTime     Length Name                                                                      
----                -------------     ------ ----                                                                      
d----        12/13/2012  12:32 PM            2012                                                                      
d----         1/29/2013   9:50 AM            2013                                                                      


    Directory: \\le\property\vt\Environmental Services\BUDGET\SPEND DOWN\2012

I tried to put them together like this:

dir -recurse | group-object Extension -noelement | where-object {$_.lastwritetime -gt (Get-date).AddDays($somenumber)}

But this did not yield any results.

How can I list the counts of all the different types of files since a certain day recursively in all directories?

Here’s my expected output:

4352    .JPG
2352    .doc
2135    .pdf
1811    .xls
1472    
857 .pub
732 .xlsx
565 .docx
66  .rtf
64  .lnk
63  .ppt
61  .url
41  .png
38  .xml
28  .htm
27  .msg
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:49:35+00:00Added an answer on June 18, 2026 at 3:49 am

    dir and gci are both aliases for the Get-ChildItem cmdLet. Just filter before grouping:

    gci -Recurse| where {$_.LastWriteTime -gt (Get-Date).AddDays(-45)}| group Extension -NoElement
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I am trying to put two inline dropdown lists. I tested and it
I'm trying to put together a GUI for setting some pricing. There are three
Trying to put a regex expression together that returns the string between _ and
I trying to put together an Android app that will take a picture and
I'm trying to put together a script to monitor the MSMQ on a server.
I'm trying to put together a layout using Bootstrap that resembles your typical OS
If I have output from two sources that I want to put together on
I'm trying to put two carousels in a page, each in a different panel
I'm trying to combine the codes from these two questions: using jQuery to slideToggle
I am trying to put a Google Plus One and a Facebook Like button

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.