Last active
June 28, 2016 15:21
-
-
Save thomasrayner/1c671eb31a95878cc7bcf32608c90a80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$filefrom = 'c:\temp\something.txt' | |
$fileto = 'c:\temp\1\something.txt' | |
if (-not (test-path $fileto)) | |
{ | |
$opts = @{'path' = $filefrom; 'destination' = $fileto; 'confirm' = $false} | |
copy-item @opts | |
} | |
else | |
{ | |
$opts = @{'path' = $filefrom; 'destination' = $fileto; 'confirm' = $true} | |
copy-item @opts | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment