![]() ![]() CreationTime -lt $maxAge | Remove -Item -Force Get -ChildItem -Path $destinationPath -Recurse -Force | Where -Object $destinationPath = "D :\something\destination\" Being a programmer I decided that rather than doing this manually it would make sense to write a quick Powershell script that would do it for me and that could be reused. Recently I needed to copy all files and folders in one location to another and then delete files older than X days in the destination folder and I would need to do this quite regularly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |