Cannot open dir for a remote location using the perl script

Iam trying to execute a perl script from an ant xml , which would open the directory in the remote location and extract some files. However Iam able to execute the saem script from command line .

The command line works fine as
C:\>perl C:\ICE\scripts\htmlpagesunzip\search_properties.pl \\sjc-filer01.corp.ebay.com\eb_dcpc\v4html_pages  C:\ICE\temp\instance1/v4html

Iam using perl version 5.8.4 from Active Site and I have confirmed that .pl is one if the allowed extensions defined in the IIS Server configurations
C:\Perl\bin\Perl.exe %s %s

The ant xml snippet
 <exec executable="perl" failonerror="true" timeout="800000">
		   <arg line="${global.script.dir}\htmlpagesunzip\search_properties.pl \\sjc-filer01.corp.ebay.com\eb_dcpc\v4html_pages ${global.temp.dir}\v4html"/>
		</exec>
 
I get error as 
[exec] Can't opendir(\\sjc-filer01.corp.ebay.com\eb_dcpc\v4html_pages): Invalid argument
     [exec]  at C:\ICE\scripts\htmlpagesunzip\search_properties.pl line 12
 
The perl script contents for search_properties.pl
 
#ICE/config/scripts/htmlpagesunzip
# This file is used to create a back up of all the build.properties files.
 use strict;
 use warnings;
 use File::Find;
 use File::Copy;
 # change these assignments as needed
 my ($srcdir,$destdir);
 
 $srcdir = $ARGV[0];
 $destdir = $ARGV[1];
 finddepth(\&wanted,$srcdir);
 
 sub wanted {
 return if -d;
 if($File::Find::name =~ /^.+build.properties$/) {
 my $file = $File::Find::name ;
 #get the subfolder containing the file
 my $subdir=$1 if($file=~/\/([^\/]+)\/[^\/]+\.properties$/);
 my $dest = $destdir.$subdir;
 mkdir($dest) unless(-e $dest); # create the folder-structure
 copy($file, "$dest") or warn "$!";
  }
 
}

Open in new window

vaibhavbajpaiAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bryan ButlerCommented:
Sounds like the privileges Ant is running with doesn't have access to the directory, where as the rights of the user running the command line does have the privilege.
   
0
vaibhavbajpaiAuthor Commented:
How would I set the priveledges in Ant for executing the remote access  ?
0
Bryan ButlerCommented:
I'm not sure.  I believe that's the tricky thing if you are talking distributed builds.  There's a bunch tool I see for doing this, with one of the free ones being:

http://sourceforge.net/projects/remoteant/

These are more for "distributed" building than "remote" building, but it might be what you need.  Here's an article on it:

http://javaboutique.internet.com/resources/books/Ant/ant4_6.html
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.