Good Afternoon
I have a config file that i need to replace anytime a user wants to switch from dev and uat
I tried creating a function so that users can just type set_dev and set_uat and it will replace that file that needs to be replaced but what I'm receiving is "Copy-Item : Cannot bind argument to parameter 'Path' because it is null.
At line:15 char:16"
Below is the script any help will be greatly appreciated, Thank you.
$destuat= "C:\Python27\pyxll-2.2.1-x86-py27"
$sourceuat= "\\dactoco.com\cap\Software\PyXLL\CTP32bit\pyxll_uat\pyxll.cfg"
$sourcedev= "C:\Python27\pyxll-2.2.1-x86-py27"
$destdev= "\\dactoco.com\cap\Software\PyXLL\CTP32bit\pyxll_dev\pyxll.cfg"
function set_uat
{
param($destuat, $sourceuat)
Copy-Item -Path $sourceuat -Destination $destuat -Force
}
function set_dev
{
param ($destdev, $sourcedev)
Copy-Item -Path $sourcedev -Destination $destdev -Force
}