-
Powershell script for moving files
I needed to move a large number of files from one directory into an archive every month and only files over one month old. Although this, in itself, is not a hard task, I wanted to automate it in a script and thought it was time to learn a bit of Powershell. Let me take through the steps I took to build the final 1 line script. Lets get started The first part of the command is to get a list of files in the folder. I found the command I needed was Get-Childitem. Get-Childitem -Path "C:\CurrentPath\" -Recurse This scans the folder in C:\CurrentPath and gets a list of files.…