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\ \\\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\ \\\eb_dcpc\v4html_pages ${global.temp.dir}\v4html"/>
I get error as 
[exec] Can't opendir(\\\eb_dcpc\v4html_pages): Invalid argument
     [exec]  at C:\ICE\scripts\htmlpagesunzip\ line 12
The perl script contents for
# This file is used to create a back up of all the 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];
 sub wanted {
 return if -d;
 if($File::Find::name =~ /^$/) {
 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

Who is Participating?
Bryan ButlerConnect With a Mentor Commented:
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:

These are more for "distributed" building than "remote" building, but it might be what you need.  Here's an article on it:
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.
vaibhavbajpaiAuthor Commented:
How would I set the priveledges in Ant for executing the remote access  ?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.