Index: trunk/ippScripts/scripts/ipp_image_path.pl
===================================================================
--- trunk/ippScripts/scripts/ipp_image_path.pl	(revision 25207)
+++ trunk/ippScripts/scripts/ipp_image_path.pl	(revision 26744)
@@ -19,9 +19,10 @@
 use PS::IPP::Metadata::Config;
 use PS::IPP::Config 1.01 qw( :standard );
+use Nebulous::Client;
 
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
 
-my ($exp_name, $class_id, $from_registered, $dbname, $verbose);
+my ($exp_name, $class_id, $from_registered, $dbname, $verbose, $alternate);
 
 GetOptions(
@@ -31,4 +32,5 @@
     'dbname|d=s'    => \$dbname, # Database name    
     'verbose'       => \$verbose,   # Print to stdout
+    'alternate'     => \$alternate,
 ) or pod2usage( 2 );
 
@@ -99,7 +101,20 @@
                 $path = resolve_ipp008_file($uri);
             } elsif ($use_017_workaround && ($uri =~ /4683/) &&
-                    ($uri =~ /ipp017/)) {
+		     ($uri =~ /ipp017/)) {
                 $path = resolve_ipp017_file($uri);
-            } else {
+            } elsif ($alternate) {
+		my $neb = $ipprc->nebulous();
+		my $uris = $neb->find_instances($uri);
+		my @files = map {URI->new($_)->file if $_} @$uris;
+		
+		if ($#files > 0) {
+		    $path = $files[1];
+		}
+		else {
+		    $path = $files[0];
+		}
+
+	    }
+	    else {
                 $path = $ipprc->file_resolve($uri);
             }
