Index: /trunk/ippTools/src/pzgetexp.c
===================================================================
--- /trunk/ippTools/src/pzgetexp.c	(revision 42919)
+++ /trunk/ippTools/src/pzgetexp.c	(revision 42920)
@@ -75,4 +75,5 @@
 
     //optional
+    PXOPT_LOOKUP_STR(fromThisFileSet, config->args, "-last-fileset", false, false);
     PXOPT_LOOKUP_S32(timeout, config->args, "-timeout", false, false);
     PXOPT_LOOKUP_BOOL(all, config->args, "-all", false);
@@ -82,7 +83,11 @@
     bool haveLastFileSet = false;
     psString lastFileSet = NULL;
+    if (fromThisFileSet) {
+      haveLastFileSet = true;
+      lastFileSet = psStringCopy (lastFileSet);
+    }
 
     // -all means "request all known filesets"
-    if (!all) {
+    if (!lastFileSet && !all) {
         char *query = "SELECT * from summitExp WHERE camera = \"%s\" and TELESCOPE = \"%s\" ORDER BY dateobs DESC LIMIT 1";
         if (!p_psDBRunQueryF(config->dbh, query, camera, telescope)) {
@@ -181,6 +186,5 @@
     }
 
-    // XXX for test, make this not a temporary table:
-    // create a temporry table
+    // create a temporary table
     {
         char *query = "CREATE TEMPORARY TABLE incoming" 
Index: /trunk/ippTools/src/pzgetexpConfig.c
===================================================================
--- /trunk/ippTools/src/pzgetexpConfig.c	(revision 42919)
+++ /trunk/ippTools/src/pzgetexpConfig.c	(revision 42920)
@@ -55,4 +55,6 @@
     psMetadataAddBool(args, PS_LIST_TAIL, "-all",  0,
         "download ALL filesets", 0);
+    psMetadataAddStr(args , PS_LIST_TAIL, "-last-fileset",  0,
+        "download from this fileset (optional)", "");
     psMetadataAddBool(args, PS_LIST_TAIL, "-ignore-errors",  0,
         "do not fail if one of the entries raises a database error", 0);
