By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,177 Members | 976 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,177 IT Pros & Developers. It's quick & easy.

Sync remote directory with local and update local directory if there is any changed.

P: 8
I have to Sync remote directory with local directory and changed according to update which i got in remote directory using tcp only.please tell me how can i do this in perl.i m totally new to this.

Aug 11 '10 #1
Share this Question
Share on Google+
5 Replies

Expert Mod 100+
P: 589
Use the rsync utility.

File::Rsync - perl module interface to rsync(1)
Aug 11 '10 #2

P: 8
Hi ron,
thanks for your reply.i am also trying form this

Aug 12 '10 #3

Expert Mod 100+
P: 589
Based on your posted question, your use of Win32::IEAutomation doesn't make any sense.

Please give more details of what you need to accomplish and the code that you're attempting to use to accomplish that task.
Aug 12 '10 #4

P: 8
hi ron,
thanks for your reply.this is the site which has mercurial repository.i have to collect all name tags first and when you click one of the name tags respective link gets open which has all files or directory which i need to copy to local directory if there is any changed.
my setp will be as below.
1.login to the merecurial site.
2.get the name tags.
3.get link with refer to name tag.
4.sync with local direcoty to files and copy if there is changed.

Please let me know how could i achieve this?

Aug 12 '10 #5

P: 8
i solved this.
below is the code to do this all above step.

Expand|Select|Wrap|Line Numbers
  1. use Win32::IEAutomation;
  3.        # Creating new instance of Internet Explorer
  4.        my $ie = Win32::IEAutomation->new( visible => 1, maximize => 1);
  6.        # Site navigation 
  7.        $ie->gotoURL('');   
  9.       print "enter tag: " ;
  10.       chomp($tag=<>);
  11.       print " tag is $tag " ;
  14.      $ie->getLink('linktext:',$tag)->Click; 
  15.       print "enter tag number: " ;
  16.       chomp($tagnumber =<>) ;
  18.       $url=$ie->getLink('linktext:', qr/$tagnumber/)->linkUrl;
  19.       print "url is $url";
  20.       $ie->gotoURL($url);
  22.      chdir('C:\Example');
  23.      print "changed to path C:\Example ";
  25.      print `dir`;
  27.      @args = ("hg", "clone", "$url");
  29.      system(@args)== 0
  30.                 or die "system @args failed: $?"
Aug 15 '10 #6

Post your reply

Sign in to post your reply or Sign up for a free account.