Ricky White
asked on
How do I delete files from a folder by month using Powershell or CMD?
I have a folder with millions of files in it. How can I delete files from that folder month by month using powershell or CMD command?
OS = Windows
Thanks
OS = Windows
Thanks
ASKER
Thanks Robert! yes, i meant File modified date.
But I would like to delete only the files that were modified in Jan 2011. And then later I would like to delete files for Feb 2011. I can run the command again as needed. Can you please suggest how that can be done?
But I would like to delete only the files that were modified in Jan 2011. And then later I would like to delete files for Feb 2011. I can run the command again as needed. Can you please suggest how that can be done?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you!
This one will delete all .txt files older than 30 days.
CMD
Open in new window
Powershell (all items older than 30 days)
Open in new window