Function CopyTwolocations ($from, $to)
{
Copy-Item -Path $from $to -Recurse -Force
$?
if($false) {Return}
}
CopyTwolocations -from "C:\Test1\Subtest1\*" -to "\\Testserver\Back-Ups\TEST\%date:~0,3%\"
CopyTwolocations -from "C:\TESTMYSQL\*" -to "\\Testserver\Back-Ups\TEST\%date:~0,3%\"
I am having trouble. I want to be able to make a sub folder for every day but all I have that works is %date:~0,3%\
but I know powershell does this but I am not quite sure how to copy it into the location of the day you copy it.
$a = Get-Date
$a.DayOfWeek