The Bulk Attachment Importer tries to regulate the size of the exported attachment files based on the number of records. However, if the individual attachments are too large, this can produce a file that is too large to easily import into the new system.
If you need to break one of these large files up, you can use the script below in PowerShell with a few tweaks:
1. Enter the correct path\filename for your large file on the first line.
2. Enter the desired path for it to create the new smaller files on the second line.
3. On the third line, change 1000 to the desired number of records per file. This will vary depending on your data, but ideally the resulting files should be no larger than 250-500 MB each.
============
$InputFilename = Get-Content 'C:\path\filename.csv'
$OutputFilenamePattern = 'C:\path\output-filename_'
$LineLimit = 1000
$line = 0
$i = 0
$file = 0
$start = 0
while ($line -le $InputFilename.Length) {
if ($i -eq $LineLimit -Or $line -eq $InputFilename.Length) {
$file++
$Filename = "$OutputFilenamePattern$file.csv"
$InputFilename[$start..($line-1)] | Out-File $Filename -Force
$start = $line;
$i = 0
Write-Host "$Filename"
}
$i++;
$line++
}