Move Files using Powershell

Below Powershell script will move all files from source to destination. Can be used as archival job. Just copy paste below script and edit yellow highlighted text as per your environment and get it working. $Date=(Get-Date).AddDays(-90).Date$Source = “D:\Test*.*“$Destination = “\share_location\TestFolder$“Foreach($file in (Get-ChildItem $Source)){If($file.LastWriteTime -lt $Date){Move-Item -Path $file.fullname -Destination $Destination}}Send-MailMessage -From From_address -To To_address -Subject “ArchiveContinue reading “Move Files using Powershell”

Design a site like this with WordPress.com
Get started