M
Michael Lanahan
Not sure what I'm doing wrong here but this script keeps telling me that a parameter is invalid and I can't figure out why.. I moved the parameters to a variable because somebody suggested that might work but I also tried
Robocopy "$StartLocation" "$EndLocation" /SEC /E /XX /MINLAD:1 /MOV /A-:SH /XF "*FULL*.bak"
Keep getting this error
Started : Thursday, December 13, 2018 5:11:51 PM
Source - L:\FakeLocation
Dest - \\ThisIsA\FakeLocation\ButThereAreNo\Spaces
NULL
Files :
Options : /DCOPYA /COPYAT /R:1000000 /W:30
NULL
------------------------------------------------------------------------------
NULL
ERROR : Invalid Parameter #3 : " /SEC"
Below is my shoddy code
PARAM($StartLocation="L:\FakeLocation",
$EndLocation="\\ThisIsA\FakeLocation\ButThereAreNo\Spaces",
$Job='1')
$Options = "/SEC /E /XX /MINLAD:1 /MOV /A-:SH /XF ""*FULL*.bak"""
$Options2 = "/SEC /E /XX /MINLAD:7 /MOV /A-:SH"
$Options3 = "/SEC /E /XX /MINLAD:1 /MOV /A-:SH"
IF ($JOB='1')
{
Robocopy "$StartLocation" "$EndLocation" $Options
Robocopy "$StartLocation" "$EndLocation" $Options2
}
IF ($JOB='2')
{
Robocopy "$StartLocation" "$EndLocation" $Options3
}
Continue reading...
Robocopy "$StartLocation" "$EndLocation" /SEC /E /XX /MINLAD:1 /MOV /A-:SH /XF "*FULL*.bak"
Keep getting this error
Started : Thursday, December 13, 2018 5:11:51 PM
Source - L:\FakeLocation
Dest - \\ThisIsA\FakeLocation\ButThereAreNo\Spaces
NULL
Files :
Options : /DCOPYA /COPYAT /R:1000000 /W:30
NULL
------------------------------------------------------------------------------
NULL
ERROR : Invalid Parameter #3 : " /SEC"
Below is my shoddy code
PARAM($StartLocation="L:\FakeLocation",
$EndLocation="\\ThisIsA\FakeLocation\ButThereAreNo\Spaces",
$Job='1')
$Options = "/SEC /E /XX /MINLAD:1 /MOV /A-:SH /XF ""*FULL*.bak"""
$Options2 = "/SEC /E /XX /MINLAD:7 /MOV /A-:SH"
$Options3 = "/SEC /E /XX /MINLAD:1 /MOV /A-:SH"
IF ($JOB='1')
{
Robocopy "$StartLocation" "$EndLocation" $Options
Robocopy "$StartLocation" "$EndLocation" $Options2
}
IF ($JOB='2')
{
Robocopy "$StartLocation" "$EndLocation" $Options3
}
Continue reading...