Comments on: How to delete files older than X days automatically using PowerShell https://pureinfotech.com/delete-files-older-than-days-powershell/ Pureinfotech is the best site to get Windows help – featuring friendly how-to guides on Windows 10, Windows 11, Xbox, and other things tech, news, deals, reviews, and more. Mon, 06 Feb 2023 14:57:38 +0000 hourly 1 https://wordpress.org/?v=6.4.2 By: Sudarsan Ilamaran https://pureinfotech.com/delete-files-older-than-days-powershell/#comment-16751 Wed, 22 Sep 2021 07:32:49 +0000 https://pureinfotech.com/?p=94617#comment-16751 Its deleting the files but its not deleted the folders, How can i delete the folders also

]]>
By: Daniel Ocampo https://pureinfotech.com/delete-files-older-than-days-powershell/#comment-16500 Thu, 26 Mar 2020 02:20:11 +0000 https://pureinfotech.com/?p=94617#comment-16500 I followed the steps, however when I enable Run whether user is logged on or not option, the programs status stays on running and never deletes the files. If I enable the run When user is logged on I get no problems. Anyone have any ideas why this is the case?

]]>
By: Thomas https://pureinfotech.com/delete-files-older-than-days-powershell/#comment-16034 Thu, 05 Dec 2019 13:07:14 +0000 https://pureinfotech.com/?p=94617#comment-16034 Can you send the files to recycle bin?

]]>
By: G-in NC https://pureinfotech.com/delete-files-older-than-days-powershell/#comment-13791 Thu, 21 Mar 2019 15:29:13 +0000 https://pureinfotech.com/?p=94617#comment-13791 The script works – however, I need to have an “auto answer” because I get a question “(folder) has children and the Recurse parameter was not specified. There are many folders (in my example) “F:ftproot” that has sub-folder and files. The script is asking “do you want to continue” and choices is “A = Yes to All, N=No, L=No to all, S=Suspend

I appreciate any help or insight to resolve this.

]]>
By: Mauro https://pureinfotech.com/delete-files-older-than-days-powershell/#comment-12414 Thu, 31 Jan 2019 17:34:03 +0000 https://pureinfotech.com/?p=94617#comment-12414 In reply to Johnathan Wright.

Trying changing the “LastWriteTime” property for the “CreationTime.”
Thanks,

]]>
By: Johnathan Wright https://pureinfotech.com/delete-files-older-than-days-powershell/#comment-12412 Thu, 31 Jan 2019 17:27:43 +0000 https://pureinfotech.com/?p=94617#comment-12412 How to modify this so it looks at creation date rather than last modified date?

]]>