Index: trunk/ippScripts/scripts/detrend_process_exp.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 9145)
+++ trunk/ippScripts/scripts/detrend_process_exp.pl	(revision 9180)
@@ -11,4 +11,8 @@
 use PS::IPP::Metadata::List qw( parse_md_list );
 use Statistics::Descriptive;
+
+use PS::IPP::Config;
+my $ipprc = PS::IPP::Config->new(); # IPP configuration
+use File::Spec;
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
@@ -84,6 +88,10 @@
 }
 
+my $example = ${$files}[0]->{b1_uri}; # Example filename
+my ($vol, $dir, $file) = File::Spec->splitpath( $example );
+
 # Generate the file list, and get the statistics
 my $outputRoot = $exp_tag . '.detproc.' . $det_id; # Root output name
+$outputRoot = File::Spec->rel2abs( File::Spec->catpath( $vol, $dir, $outputRoot ), $ipprc->workdir() );
 my $list1Name = $outputRoot . '.b1.list'; # Name for the input file list for binning 1
 my $list2Name = $outputRoot . '.b2.list'; # Name for the input file list for binning 2
@@ -93,6 +101,6 @@
 open my $list2File, '>' . $list2Name;
 foreach my $file (@$files) {
-    print $list1File $file->{b1_uri} . "\n";
-    print $list2File $file->{b2_uri} . "\n";
+    print $list1File File::Spec->rel2abs( $file->{b1_uri}, $ipprc->workdir() ) . "\n";
+    print $list2File File::Spec->rel2abs( $file->{b2_uri}, $ipprc->workdir() ) . "\n";
     push @means, $file->{bg};
     push @stdevs, $file->{bg_stdev};
@@ -121,5 +129,7 @@
 }
 
+
 # Add the result into the database
+$outputRoot = File::Spec->abs2rel( $outputRoot, $ipprc->workdir() );
 unless ($no_update) {
     my $command = "$dettool -addprocessedexp -det_id $det_id -exp_tag $exp_tag " .
