/DeleteFilesOlderThanXDays

PowerShell Script to delete files from a list of folders that are older than a given number of days

Primary LanguagePowerShellGNU General Public License v3.0GPL-3.0

This is a simple script which can be used for housekeeping growing list of files like IIS Logs, Temporary Files and so on. No special Snap-Ins or Modules required to be imported.

Download

https://github.com/junecastillote/DeleteFilesOlderThanXDays

Files

  • DeleteFilesOlderThanXDays.ps1 - The main script
  • DirList.txt - List of folders to perform deletion against. This can be a local, shared or UNC paths.

Variables