how do I programmatically save nodes with multiple photo uploads?
You would normally just build up the files in a loop like so:

$images = array();

foreach ($file_data_array as $file_data) {
  $file = new stdClass();
  $file-&gt;filename = basename($file_data['filepath']);
  $file-&gt;filepath = $file_data['filepath'];
  $file-&gt;filemime = $file_data['mime'];
  $file-&gt;filesize = filesize($file_data['filepath']);

  $file-&gt;uid = $uid;
  $file-&gt;status = FILE_STATUS_PERMANENT;
  file_save($file);

  $images[] = array(
    'fid' =&gt; $file-&gt;fid,
    'alt' =&gt; $file_data['alt'],
    'title' =&gt; $file_data['title']
  );
}

$node = new stdClass;
// Build up the rest of the node as normal

$node-&gt;field_images[LANGUAGE_NONE] = $images;

node_save($node);


This assumes you have your CSV data loaded into an array called $file_data_array. 

fid, alt, title, height and width are the only columns available to an image field type so there's no need to build up an array for each field entry containing all the file details (you can ignore that bit in the other answer you linked to as it's unnecessary).

Also note the use of file_save() instead of drupal_write_record() to commit the file to the database...it's much better to use file_save() as it fires the necessary system hooks to let other modules react to your files being added.

Hope that helps