Powershell scripts for searching files older than X days and group by date and archive them RRS feed

  • Question

  • Hi All,

    Im trying for Powershell script for searching files in a folder older than X days and group by date and archive them with custom name and last modified date (file modified date). Please help me on this script

    Thanks .


    Wednesday, April 22, 2020 2:14 PM

All replies

  • What have you tried?  Post your script with any errors.


    Wednesday, April 22, 2020 4:07 PM
  • Hi Jrv,

    Im new to Powershell script i work mostly on linux, for now i found the script to group by year older than x days, I want the script to group by date and archive them which are older than x days. Please help me here. Thanks.

    Saturday, April 25, 2020 10:19 AM
  •  i found the script to group by year older than x days, 

    Please help me here. Thanks.

    You're asking for help, but you are not asking a specific question that we can answer. Users on this forum will help you, but we are not going to write it for you.  If you have no programming experience at all then you should take courses before you try to write code. If you do have experience, then it should be a matter of learning the nuances of Powershell syntax, functions, objects, etc. 

    Here's a good document that you can use for reference. https://www.sapien.com/books_training/Windows-PowerShell-4

    Or refer to the MS docs. https://docs.microsoft.com/en-us/powershell/

    If you found a sample script to start with, great. That's how I write a lot of my code. I just look for code examples and tweak them to do what I want.  

    Try to modify it to do what you want.  


    • Edited by MotoX80 Saturday, April 25, 2020 3:32 PM
    Saturday, April 25, 2020 12:29 PM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Yang Yang

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, April 27, 2020 2:17 AM