Good Afternoon all ![]()
I have a script whereby I want to copy items in a folder from one directory to another. The script works the first time but then behaves differently subsequent times by recreating the source folder again, how do I stop this behaviour please?
[string]$FolderName = Get-Date -f dd
$SourcePath = "\\server\folder1\folder2\"
$DestinationPath = "\\server\folder1\"
Copy-Item -Path $SourcePath -Destination $DestinationPath\$FolderName -Recurse -Force