Delete PDFs Older Than 90 Days with Log [PowerShell Commands]

I need to delete all the PDF files older than 90 days. I don't want to filter them one by one. Can I do this with PowerShell? If there are any other ways, I will be glad to hear.

Best Answered by

Dany· Answered on Jul 20, 2023

It is not easy to delete only PDF files older than 90 days, and you need a script to do that with PowerShell. You can find the script to delete PDFs older than 90 days from this link. It is a complicated script, and you should pay more attention to avoid unnecessary data loss.

You can easily delete PDF files older than 90 days using File Explorer. You just open File Explorer and filter the files older than 90 days, choose PDF files and delete them. It is a manual way, but it is super simple for a new hand.

CMD can also do that, and you will need the ForFiles command. The command you need is here: ForFiles /p "C:\path\to\folder"/s /d -X /c "cmd /c del /q @file". Change "C:pathtofolder" and "/d -X" to the path and option you wish to choose.

Suppose you are looking for methods to recover accidentally deleted files and the files are neither in the Recycle Bin nor have backup files. In that case, we have a good solution for you to recover them by utilizing a specialized data recovery tool, EaseUS Data Recovery Wizard.

1. Click the "Scan" button after selecting the precise file location to carry on. You can recover data from the local drive, external hard drive, SD card…

2. Choose the "Deleted Files" and "Other Lost Files" folders in the left panel when the procedure is complete. The deleted files may then be located by using the "Filter" option or by clicking the "Search files or folders" button.

3. Select "Recover" and then save the recovered files. Ideally, they should be distinct from the originals.

Use EaseUS Data Recovery Wizard to recover deleted or lost files easily and quickly.

Tutorials on how to recover lost, deleted, or formatted data from HDD, SSD, USB, SD card, or other storage media on Windows and Mac.

People Also Ask

Bak File Recovery Software Free Download

Download the best Bak file recovery software to recover accidentally deleted or corrupted Back files as soon as possible. It's the best way to recover your backup files (.bak file extension) from any device.


Jul 20, 2023

How to Recover Deleted Files from SD Card Using Chrome OS

SD cards are widely used due to their high data transfer speed and hot-swappable features, although various data loss issues plague them. Don't panic if you accidentally delete files from your SD card; different recovery methods and SD recovery software can help you retrieve deleted files from your SD card.


Jul 20, 2023

How to Recover Deleted Bitmap Image Files

Many things might cause BMP files to be lost, and when you suddenly realize you can't find vital BMP files, it can be daunting. Fortunately, these files can still be retrieved with the right tools. This article will walk you through every step to quickly recover deleted BMP files.


Jul 20, 2023

How to Recover Files Deleted by CHKDSK [2023 Update]

Data files lost after running CHKDSK scan? CHKDSK delete your files? This page shows you how to undelete or recover files deleted by CHKDSK with simple steps by yourself using powerful and easy-to-use Windows file recovery software.


Jul 20, 2023

Data Deleted by Mistake on Windows 7, What Can I Do

How can I restore files that have been permanently deleted? By hitting the Shift + Erase keys, you can delete files or directories from your computer. If you do this and need to retrieve permanently erased files, one of the various data recovery applications available is EaseUS Data Recovery Wizard.


Jul 20, 2023

Do Delete Files from SD Card Go to Recycle Bin on Windows

Do delete files from SD card go to Recycle Bin? After deleting some files from your SD card, you can't find the deleted files in Recycle Bin. If you want to know where the deleted files from the SD card go, this article will tell you the answer.


Jul 20, 2023