PowerShell to move specific files after x days
Explanation: Set the directories: Replace "C:\SourceDirectory" and "C:\DestinationDirectory" with the actual source and destination paths. Set file types: Replace ` “.txt”, “.log”` with the desired file extensions. Set the number of days: Modify $days to specify the age threshold for moving files. Get the current date: The script calculates the cutoff date by subtracting the specified number of days from the current date. Get the... » read more