Solution
To solve this problem we are providing two Windows Powershell scripts:
- zip-attachment-folder-into-batches.ps1 - zips the .dat files into batches of zipfiles
- unzip-attachments-in-bulk.ps1 - unzips the batches of zip files into the attachments folder
The first script will create batches of zipfiles (by default containing 250 attachments, but you can change the batch size) that contains the attachments using this numbering scheme:
dat_batch_0001.zip
dat_batch_0002.zip
...
dat_batch_9999.zip
These can then be atomically copies to the destination system and then bulk unzipped into the destination system.