Hi i would like to copy content from a folder but there is 1 specific file called Web.config which i do not want to copy.
i am using the following script but no luck
$unzipAdmin = 'c:\Temp\unzipAdmin'
$copyAdmin = $unzipAdmin + "/Content/*"
get-childitem "C:\deployments\website" -recurse | % {if($_.Name -ne 'Web.config')
{
Copy-Item -Path $copyAdmin -Destination 'C:\Projects\Admin' -Recurse -force
}
}
all files and folders are inside content, so i would like to copy every thing except Web.config and 1 folder which is called Deploy