GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   How To take one HTML file and duplicate it into 20 copies all named differently? (https://gfy.com/showthread.php?t=456742)

Alex 04-16-2005 09:09 PM

How To take one HTML file and duplicate it into 20 copies all named differently?
 
Is there something that does this?

I want to take an any.html file
Duplicate it and have it renamed to freeporn.html teenporn.html freesex.html etc etc, all names taht i insert.

BV 04-16-2005 09:12 PM

chamelion submitter

SmokeyTheBear 04-16-2005 09:20 PM

how do you want it to create the new names ? random? or from a text file?

Alex 04-16-2005 09:23 PM

Quote:

Originally Posted by BV
chamelion submitter

Something that is more specific for the certain job that i need?
Chameleon is also a submitter

Alex 04-16-2005 09:29 PM

Quote:

Originally Posted by SmokeyTheBear
how do you want it to create the new names ? random? or from a text file?


from a text file

DamageX 04-16-2005 09:31 PM

Quote:

Originally Posted by Alex
Something that is more specific for the certain job that i need?
Chameleon is also a submitter

I had a pal hack me a handy little script for this, one single file and easily modifiable, about three years ago. Unfortunately, this was also about 5-6 HDD crashes ago... I'll look for it on my backup CD's, if I find it I'll let you know.

DateDoc 04-16-2005 09:32 PM

in the time you have waited for an answer you could have used that awesome feature we all have. Copy and paste!!!

Alex 04-16-2005 09:34 PM

Quote:

Originally Posted by BusterPorn
in the time you have waited for an answer you could have used that awesome feature we all have. Copy and paste!!!

Does copy and paste rename too? :1orglaugh :1orglaugh :1orglaugh

BV 04-16-2005 09:59 PM

Quote:

Originally Posted by Alex
Something that is more specific for the certain job that i need?
Chameleon is also a submitter

I know Cham Sub is a submitter, but it will also do what you need.

I've thoroughly looked and could not find this in an off the shelf script anywhere.


Make a text file with the names you want the copied pages and CS will duplicate and rename them accordingly.

SmokeyTheBear 04-16-2005 10:06 PM

I could create something for you if you want.. I might have something for that hold on..

SmokeyTheBear 04-16-2005 10:08 PM

Wouldnt you rather it be a little random , ? Like maybe make every file the same but the title of the page be the title of the name of the file ?

DateDoc 04-16-2005 10:09 PM

Quote:

Originally Posted by Alex
Does copy and paste rename too? :1orglaugh :1orglaugh :1orglaugh

In the hour this thread has been running I hope you could have typed out 20 renames! If not try typing class.

Alex 04-16-2005 11:04 PM

Quote:

Originally Posted by SmokeyTheBear
Wouldnt you rather it be a little random , ? Like maybe make every file the same but the title of the page be the title of the name of the file ?

No i need to have 20 different html files duplicated into 20 more of the same file but with names. It sounds confusing but the reason i need the names to be chosen cannot change.

DamageX 04-16-2005 11:23 PM

Got it! Check your ICQ. :)

prodiac 04-17-2005 12:19 AM

Code:

#!/usr/local/bin/perl
 
$file_orig = "_somefile.html";
$files = "filename_list.txt
 
open (FILE, $files);     
@allfiles=<FILE>;   
close(FILE); 
 
foreach $name (@allfiles) {
 chop($name);
 system("/bin/cp $file_orig $name");
 }
 
exit;


austinth 04-17-2005 01:07 AM

do a search on google for a doorway page generator.

CDSmith 04-17-2005 01:15 AM

Quote:

Originally Posted by BusterPorn
In the hour this thread has been running I hope you could have typed out 20 renames! If not try typing class.

Was thinking the same thing as I read this thread.I use a little known technique called "save as" :1orglaugh

Seriously, I could have had 20 copies of the same page renamed and saved in fifteen minutes at the most, including a pee break.

prodiac 04-17-2005 01:36 AM

Quote:

Originally Posted by prodiac
Code:

#!/usr/local/bin/perl
 
$file_orig = "_somefile.html";
$files = "filename_list.txt
 
open (FILE, $files);     
@allfiles=<FILE>;   
close(FILE); 
 
foreach $name (@allfiles) {
 chop($name);
 system("/bin/cp $file_orig $name");
 }
 
exit;


There was a mistake on the following line:

Code:

$files = "filename_list.txt
It should be:

Code:

$files = "filename_list.txt";

sumphatpimp 04-17-2005 05:27 AM

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
20

done!
send money paypal now!

Tipsy 04-17-2005 05:37 AM

I made a little VB script once that duplicated a file and renamed it using 1000's of different keyword combos. It made me a LOT of dialler mins back in the free napster days :)

Hmmm...can't find it now though. If it turns up I'll hit you up and send a copy.

~Ray 04-17-2005 09:46 AM

hit up manuel from oxeo.com , he'll write a script for you very quickly.
his icq is 20214646


~Ray

pstation 04-17-2005 09:48 AM

it'd probably be easier to use .htaccess ... that way when you need to edit it, you wont be having to change 20 different files, creating symbolic links would work well too

TheJimmy 04-17-2005 09:54 AM

if you haven't found anything yet, beep me on ICQ at 5702550, I think I have a little mass/renaming tool in VB that could work...I'll go look for it now...

pstation 04-17-2005 10:04 AM

if a redirect is fine, you can do this in .htaccess
Code:

Redirect /folder/faggot.html http://www.mydomain.com/folder/mainpage.html
alternatively, you can use mod_rewrite if a server redirection wont work

Naughty 04-17-2005 10:14 AM

Quote:

Originally Posted by prodiac
Code:

#!/usr/local/bin/perl
 
$file_orig = "_somefile.html";
$files = "filename_list.txt
 
open (FILE, $files);     
@allfiles=<FILE>;   
close(FILE); 
 
foreach $name (@allfiles) {
 chop($name);
 system("/bin/cp $file_orig $name");
 }
 
exit;


And what if you want to edit the text between the TITLE tags on the html page as well, and in php instead of perl?

The Sultan Of Smut 04-17-2005 10:50 AM

Quote:

Originally Posted by Alex
Does copy and paste rename too? :1orglaugh :1orglaugh :1orglaugh

Well yes it does but probably not the way you want it to. So you need a batch file renamer as well. I use this one:

http://hp.vector.co.jp/authors/VA014...lish/FlexRena/

Alex 04-17-2005 11:15 AM

Yea i already got what i need.

When you need to name 150 different files into 20 different names time ads up.
Thanks all.

prodiac 04-17-2005 11:21 AM

Quote:

Originally Posted by Naughty
And what if you want to edit the text between the TITLE tags on the html page as well, and in php instead of perl?

It would take me a bit more time than I have right now to get it in PHP, so I modified it a bit in perl ..

in _template.html this will be your original file you start with, The title line needs to be: <title>%%TITLE%%</title>

In the filelist, which I called filename_list.txt, the file needs to look like this:
Code:

someword1.html||Title for someword1 file goes here
someword2.html||Title for someword2 file goes here
someword3.html||Title for someword3 file goes here

And so on ..

Here is the modified script .. going out for the rest of the day right now, didn't test it, but it should work....
Code:

#!/usr/local/bin/perl

$template = "_template.html";
$files = "filename_list.txt

open (TPL, $template); 
@tpllines=<TPL>;
close(TPL);

open (FILE, $files);
@allfiles=<FILE>;
close(FILE);

foreach $list (@allfiles) {
 chop($list);
 ($name,$title) = split(/||/, $list); 
 open (NEWFILE, ">${name}");           
  foreach $line (@tpllines) {
  chop($line);
  $line =~ s/%%TITLE%%/$title/;
  print NEWFILE "$line\n";
  }
 close(NEWFILE);
 }

exit;


mardigras 04-17-2005 11:26 AM

Only talking 20 files or so and want them named various things rather than sequentially numbered, I would just go for copy & hit Crtl+V 19 times and rename them manually.

Naughty 04-17-2005 03:05 PM

Quote:

Originally Posted by prodiac
It would take me a bit more time than I have right now to get it in PHP, so I modified it a bit in perl ..

in _template.html this will be your original file you start with, The title line needs to be: <title>%%TITLE%%</title>

In the filelist, which I called filename_list.txt, the file needs to look like this:
Code:

someword1.html||Title for someword1 file goes here
someword2.html||Title for someword2 file goes here
someword3.html||Title for someword3 file goes here

And so on ..

Here is the modified script .. going out for the rest of the day right now, didn't test it, but it should work....
Code:

#!/usr/local/bin/perl

$template = "_template.html";
$files = "filename_list.txt

open (TPL, $template); 
@tpllines=<TPL>;
close(TPL);

open (FILE, $files);
@allfiles=<FILE>;
close(FILE);

foreach $list (@allfiles) {
 chop($list);
 ($name,$title) = split(/||/, $list); 
 open (NEWFILE, ">${name}");           
  foreach $line (@tpllines) {
  chop($line);
  $line =~ s/%%TITLE%%/$title/;
  print NEWFILE "$line\n";
  }
 close(NEWFILE);
 }

exit;


Nice, I don't need it per se, but I thought it was good to know. Will save it for future reference.

Thanks.


All times are GMT -7. The time now is 11:46 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123