enter code here
$rootpath = "D:\SSIS_Package_Deployments\"
$e = "ssisname"
$m = "\"
$de = New-Item $rootpath$e$m"Deployment_$((get-date).toString('yyyyMMdd'))" -type directory
#if (-not {$de | out-null}){
if ( $de ){
foreach ($i in Get-ChildItem -Path $de -type directory)
{
if (($i.Name -match "Deployment_$((get-date).toString('yyyyMMdd'))") )
{
echo $i.Name
Move-Item c:\temp\STA\*.dtsConfig $i.Name -force
}
}
}
脚本具有新创建的当前日期文件夹但文件未在该文件夹中移动 它给出了错误项已经存在,我想在该文件夹中添加文件