Index: trunk/ippToPsps/jython/batch.py
===================================================================
--- trunk/ippToPsps/jython/batch.py	(revision 32091)
+++ trunk/ippToPsps/jython/batch.py	(revision 32118)
@@ -11,5 +11,4 @@
 from subprocess import call, PIPE, Popen
 
-from datastore import Datastore
 from scratchdb import ScratchDb
 from gpc1db import Gpc1Db
@@ -97,7 +96,17 @@
 
         # get local storage location from config
-        self.batchName = "B%08d" % self.batchID
-        self.subDir = self.doc.find("localOutPath").text + "/" + self.batchType + "/" + dvoGpc1Label
-        self.localOutPath = self.subDir + "/" + self.batchName 
+        self.batchName = Batch.getNameFromID(self.batchID)
+        basePath = self.doc.find("localOutPath").text
+        self.subDir = Batch.getSubDir(
+                basePath,
+                self.batchType, 
+                dvoGpc1Label)
+
+        self.localOutPath = Batch.getOutputPath(
+                basePath,
+                self.batchType, 
+                dvoGpc1Label,
+                self.batchID)
+
         if not os.path.exists(self.localOutPath): os.makedirs(self.localOutPath)
 
@@ -125,4 +134,25 @@
 
         self.everythingOK = True
+    
+    '''
+    Static method to generated batch name from batch ID
+    '''
+    @staticmethod
+    def getNameFromID(id):
+       return "B%08d" % id
+
+    '''
+    Static method to generated sub directory for batch on local disk
+    '''
+    @staticmethod
+    def getSubDir(basePath, batchType, dvoLabel):
+       return basePath + "/" + batchType + "/" + dvoLabel
+
+    '''
+    Static method to generated output path for batch
+    '''
+    @staticmethod
+    def getOutputPath(basePath, batchType, dvoLabel, id):
+       return Batch.getSubDir(basePath, batchType, dvoLabel) + "/" + Batch.getNameFromID(id)
 
     '''
@@ -448,3 +478,4 @@
         self.logger.infoPair("Batch......", "complete")
 
-
+from datastore import Datastore
+
