Благодарю за помощь.
Теперь не могу скопировать данные.
Код:

cls
cd y:\
$base = Import-Csv DATA.txt -Delimiter ":" -Header "N","Отдел","Контактный номер"
$files = Get-ChildItem Y:\TableReports | Where {!$_.PsIsContainer -and $_.Name -match ".enc$"} | Select-Object -Expand FullName
$DayFolder = New-item -Path Y:\week -name "$(Get-Date -uformat '%Y%m%d')" -type directory
$DayFolder2 = New-item -Path Y:\markdelete -name "$(Get-Date -uformat '%Y%m%d')" -type directory
cd Y:\TableReports
foreach($name in $base)
{
$findFile = $files -match $name.N
if($findFile)
{
Write-Host "Файл прислали"
$findAtr = $findFile -match "rar.sig.enc$" -cmatch "S"
if($findAtr)
{
Write-Host "Атрибуты верны"
Copy-Item -Path $findAtr -Destination $DayFolder.FullName
}
else
{
Write-Host "Атрибуты НЕ верны"
$name.N
Copy-Item -Path $findAtr -Destination $DayFolder2.FullName
}
}
else
{
Write-Host "Файл НЕ прислали"
}
}
В базе DATA.txt содержится список контактов. Начинается с номера. Есть номера вида: 53-1
Вот на них и ругается.
Код:

...
Атрибуты НЕ верны
33-1
Copy-Item : Не удается привязать аргумент к параметру "Path", так как он представляет собой пустой массив.
C:\Dropbox\VFTP_подписиЧУЖОЙ.ps1:24 знак:18
+ Copy-Item -Path <<<< $findAtr -Destination $DayFolder2.FullName
+ CategoryInfo : InvalidData: (:) [Copy-Item], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorEmptyArrayNotAllowed,Microsoft.PowerShell.Commands.
CopyItemCommand
Файл прислали
...
Я так понимаю, что вот эта конструкция:
Код:

$findFile = $files -match $name.N
if($findFile)
{}
else
{}
В случае отрицательного значение (переход в else) в $findfile = ничего не возвращает. Как быть?