Quick Script Share - Prompt To Copy File If It Already Exists
By default, Copy-Item will overwrite a file if it exists, unless that file is marked Read Only (in which case you can use the -Force switch to overwrite the file). What if you want to only copy the file if it doesn’t exist, though? What then?
Well, then do this:
Written on November 16, 2016