PoshCode Archive  Artifact [365c4743d7]

Artifact 365c4743d7a7687611be3879874d25ea4efa8962e91e3300583a45a10f41b3f1:

  • File Copy-files-to-dated-directory.ps1 — part of check-in [4f8426eeb8] at 2018-06-10 13:51:05 on branch trunk — Copy files to dated directory. (user: unknown size: 391)

# encoding: ascii
# api: powershell
# title: 
# description: Copy files to dated directory.
# version: 0.1
# license: CC0
# x-poshcode-id: 5159
# x-archived: 2014-07-01T14:32:26
#
#
$date = Get-Date -Format "yyyyMMdd"
$source = 'C:\dir'
$destination = "C:\someotherdir\$date\"

New-Item -ItemType directory -Path $destination
Copy-Item $source "$destination" -Recurse -Force