Index: trunk/ippToPsps/perl/ippToPsps_run.pl
===================================================================
--- trunk/ippToPsps/perl/ippToPsps_run.pl	(revision 28898)
+++ trunk/ippToPsps/perl/ippToPsps_run.pl	(revision 28907)
@@ -188,6 +188,11 @@
         # generate batch path from batch IDs
         my $batch = sprintf("B%08d", $batchId);
-        my $batchDir = sprintf("$output/$batch");
+        my $dvoDir = "$output/$dvoDb";
+        my $batchDir = "$dvoDir/$batch";
+
+        # make directories
+        unless(-d $dvoDir) {mkdir($dvoDir, 0777);}
         mkdir($batchDir, 0777);
+
         $published = 0;
 
@@ -203,9 +208,12 @@
             if (writeBatchManifest($batchDir, $batch, $batchType, $surveyType, $filename, $minObjId, $maxObjId)) {
 
+                # tar n' zip
                 if (!$dontTarNZip) {
-                    my $tarball = tarAndZipBatch($output, $batch);
+                    my $tarball = tarAndZipBatch($dvoDir, $batch);
+
+                    # and publish
                     if ($tarball && defined $datastore ) {
                         
-                        $published = $datastore->register($batch, $output, $tarball, "IPP_PSPS", "tgz");
+                        $published = $datastore->register($batch, $dvoDir, $tarball, "IPP_PSPS", "tgz");
                     }
                 }
