Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    General Discussion    Chit - Chat  ›  Copy
Users Browsing Forum
No Members and 2 Guests

Copy  This thread currently has 375 views. Print
1 Pages 1 Recommend Thread
tylermenezes
February 3, 2007, 6:54pm Report to Moderator Report to Moderator

Anybody here speak Python? HHHSSSSSSSSSSSSSS!
Posts: 201
Gender: Male
Posts Per Day: 0.21
Reputation: 90.48%
Reputation Score: +19 / -2
Time Online: 1 days 5 hours 56 minutes
Location: Redmond, Washington
Age: 16
Ok, a lot of members at my website want E-Blah forums for thier websites. I used to install each forum by hand but I can't anymore. What I need to know is how can I copy the entire E-Blah directory in PERL?

What I would know is:

The directory the template forum is located in.
The directory to copy.


Could you help?



Revision History (1 edits)
tylermenezes  -  February 3, 2007, 8:51pm
Logged Offline
Site Site Private Message Private message
tylermenezes
February 3, 2007, 8:35pm Report to Moderator Report to Moderator

Anybody here speak Python? HHHSSSSSSSSSSSSSS!
Posts: 201
Gender: Male
Posts Per Day: 0.21
Reputation: 90.48%
Reputation Score: +19 / -2
Time Online: 1 days 5 hours 56 minutes
Location: Redmond, Washington
Age: 16
Here's what I came up with:

Code
use File::Copy;
 my @dir = @_;
 $pfad = "./mywebs/testing3";
 $target = "./mywebs/ioewryoieur";

 opendir(DIR,$pfad);
 @dir = readdir(DIR);
 closedir(DIR);
 unless(-e $target){ mkdir($target,0777);}
 my $dd;

  foreach $dd ( sort @dir ){
 	  unless (-d "$pfad/$dd") {
 		if (-e "$target/$dd"){
	 			$errcntm++;
		}
		else{
			copy("$pfad/$dd","$target/$dd");
 	  	}
    }
  }
  foreach $dd ( sort @dir ){
   if( $dd ne "." && $dd ne ".." && -d "$pfad/$dd" ){
    unless(-e "$target/$dd"){
    	mkdir("$target/$dd",0777);
    }
   }
  }

 return($errcntm);


Logged Offline
Site Site Private Message Private message Reply: 1 - 1
1 Pages 1 Recommend Thread
Print

E-Blah Community    General Discussion    Chit - Chat  ›  Copy