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.
Dany· Answered on Feb 03, 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.
How Do I Fix Missing File Extensions for Recovered Files
After recovering data with a recovery tool, it is sad to get a bunch of files without file extensions. You can try to open these files without extensions or choose another data recovery program to recover data from your NAS device.
Dec 29, 2022
How to Recover Deleted Files on Windows File Server
You can recover deleted files on Windows Serve due to system updates, thoughtless deletion, formatting, or an unexpected virus assault using EaseUS data recovery software. Continue reading to recover Windows Server files right away.
Dec 29, 2022
How to Fix 'Can't Delete a File on Windows Server' Issue
It will sometimes happen that you cannot access or delete a specific file suddenly. We think the methods below will help you get out of this situation, and you can have a try.
Jan 11, 2023
How to Delete Hacker Files to Free Up Space on Windows
Virus attacks and malware may cause chaos on your computer, and you may not be able to delete some files. We will help you remove the files with CMD and show you how to format the hard drive.
Jan 18, 2023
What Is the Use of Shift Delete on Windows
We know many shortcuts can be used on Windows, and we are going to introduce the use of Shift + Delete on Windows. We will also let you know when and why you need to use this shortcut on Windows in this passage.
Jan 31, 2023
How to Delete Batch Files of a Folder but Not Subfolders
It is possible to delete files in a folder and keep the subfolders, and you need to use command lines in Command Prompt. Learn the details by reading the following passage.
Feb 03, 2023