Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## 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
Advertisement
Add Comment
Please, Sign In to add comment