Recursively copy folder to date-stamped backup folder
## This script recursively copies a folder to a backup location. ## The name of the backup folder serves as a date stamp, using ## today's date and current UTC time to name the folder. $printedDate = Get-Date -format "MM-dd-yy" $ED=[Math]::Floor([decimal](Get-Date(Get-Date).ToUniversalTime()-uformat "%s")) $savefilename = $printedDate + "_" + $ED Copy-Item C:\path1 -Destination c:\path2\$savefilename -Recurse
Comments