Powershell script to validate if file exist and copy : Basically what I'm trying to do is validate using .csv if file exist in the folder copy to new location. If file doesn't exist create text file with missing items.

This is what i currently have. It lacks in copying file that exist.

Import-Csv .\files.csv | ForEach {

    If (Test-Path -Path $_.File) {

        Write-Output "$($_.File) exists"

    } Else {

        Write-Output "$($_.File) does NOT exist"
        $_.File | Out-File .\missingFiles.txt -Append

    }

}