Index: trunk/Mars/hawc/processing/extract-aux-data.sh
===================================================================
--- trunk/Mars/hawc/processing/extract-aux-data.sh	(revision 20033)
+++ trunk/Mars/hawc/processing/extract-aux-data.sh	(revision 20034)
@@ -90,10 +90,6 @@
 
   # Split night into year, month, day
-  YEAR=`echo ${NIGHT}  | cut -c1-4`
-  MONTH=`echo ${NIGHT} | cut -c5-6`
-  DAY=`echo ${NIGHT}   | cut -c7-8`
-
   # Base path for the night
-  FNAME=${AUX}/${YEAR}/${MONTH}/${DAY}/${NIGHT}
+  FNAME="${AUX}"/${NIGHT:0:4}/${NIGHT:4:2}/${NIGHT:6:2}/${NIGHT}
 
   echo ""
Index: trunk/Mars/hawc/processing/extract-raw-headers.sh
===================================================================
--- trunk/Mars/hawc/processing/extract-raw-headers.sh	(revision 20033)
+++ trunk/Mars/hawc/processing/extract-raw-headers.sh	(revision 20034)
@@ -63,14 +63,9 @@
 do
 
-   # Extract year, month and day from directory name 
-   YEAR=`echo  ${SUBDIR} | cut -f6 -d\/`
-   MONTH=`echo ${SUBDIR} | cut -f7 -d\/`
-   DAY=`echo   ${SUBDIR} | cut -f8 -d\/`
-
    # Loop over all files in this subdirectory
-   for ROOT in ${SUBDIR}/${YEAR}${MONTH}${DAY}*.fits.fz
+   for ROOT in ${SUBDIR}/${NIGHT}*.fits.fz
    do
       FILE=`echo ${ROOT} | cut -f2 -d_`
-      echo ${YEAR} ${MONTH} ${DAY} ${FILE} ${ROOT}
+      echo ${NIGHT} ${FILE} ${ROOT}
 
       # Extact the header from the fits file with fitsdump, the following chain
Index: trunk/Mars/hawc/processing/run-callisto.sh
===================================================================
--- trunk/Mars/hawc/processing/run-callisto.sh	(revision 20033)
+++ trunk/Mars/hawc/processing/run-callisto.sh	(revision 20034)
@@ -46,16 +46,7 @@
   DRSRUNID=${LINE[3]}
 
-  # Split both into year, month, day
-  DATYEAR=`echo ${DATNIGHT}  | cut -c1-4`
-  DATMONTH=`echo ${DATNIGHT} | cut -c5-6`
-  DATDAY=`echo ${DATNIGHT}   | cut -c7-8`
-
-  DRSYEAR=`echo ${DRSNIGHT}  | cut -c1-4`
-  DRSMONTH=`echo ${DRSNIGHT} | cut -c5-6`
-  DRSDAY=`echo ${DRSNIGHT}   | cut -c7-8`
-
   # Formatting of the file paths and names
-  DATPATH="${DATYEAR}/${DATMONTH}/${DATDAY}"
-  DRSPATH="${DRSYEAR}/${DRSMONTH}/${DRSDAY}"
+  DATPATH=${DATNIGHT:0:4}/${DATNIGHT:4:2}/${DATNIGHT:6:2}
+  DRSPATH=${DRSNIGHT:0:4}/${DRSNIGHT:4:2}/${DRSNIGHT:6:2}
 
   PREFIX=`printf ${DATNIGHT}_%03d ${DATRUNID}`
Index: trunk/Mars/hawc/processing/run-root2sql.sh
===================================================================
--- trunk/Mars/hawc/processing/run-root2sql.sh	(revision 20033)
+++ trunk/Mars/hawc/processing/run-root2sql.sh	(revision 20034)
@@ -44,11 +44,6 @@
   RUNID=${LINE[1]}
 
-  # Split into year, month, day
-  YEAR=`echo ${NIGHT}  | cut -c1-4`
-  MONTH=`echo ${NIGHT} | cut -c5-6`
-  DAY=`echo ${NIGHT}   | cut -c7-8`
-
   # Format file and path names
-  DIR="${BASEIN}/${YEAR}/${MONTH}/${DAY}"
+  DIR="${BASEIN}"/${NIGHT:0:4}/${NIGHT:4:2}/${NIGHT:6:2}
 
   PREFIX=`printf ${NIGHT}_%03d ${RUNID}`
Index: trunk/Mars/hawc/processing/run-star.sh
===================================================================
--- trunk/Mars/hawc/processing/run-star.sh	(revision 20033)
+++ trunk/Mars/hawc/processing/run-star.sh	(revision 20034)
@@ -44,11 +44,6 @@
   RUNID=${LINE[1]}
 
-  # Split into year, month, day
-  YEAR=`echo ${NIGHT}  | cut -c1-4`
-  MONTH=`echo ${NIGHT} | cut -c5-6`
-  DAY=`echo ${NIGHT}   | cut -c7-8`
-
   # Formatting of the file paths and names
-  DATPATH="${YEAR}/${MONTH}/${DAY}"
+  DATPATH=${NIGHT:0:4}/${NIGHT:4:2}/${NIGHT:6:2}
 
   PREFIX=`printf ${NIGHT}_%03d ${RUNID}`
@@ -90,5 +85,5 @@
      rm -f ${OUT}/.${PREFIX}.running
 
-     # If processing was successfull write coresponding flag     
+     # If processing was successfull write coresponding flag
      if [ "${RC}" == "0" ]
      then
