# How to patch rename a large number of links



## kenny1999 (Jun 1, 2016)

Hi

I am not talking about patch renaming files, we have bulk rename ultity to do that

I mean, now I have a link

www.abc.com/ex0001.zip


I want to type 9999 links in a text file with pattern like the following, but I don't want to copy and paste and rename 9999 times, it will drive me mad

www.abc.com/ex0001.zip
www.abc.com/ex0002.zip
www.abc.com/ex0003.zip
www.abc.com/ex0004.zip
......

www.abc.com/ex9998.zip
www.abc.com/ex9999.zip


abc.com is just an example


----------



## Cromewell (Jun 1, 2016)

Why are you doing this?

Check out http://www.seleniumhq.org/
Alternatively, http://www.greasespot.net/

Either, with a little work, could do what you want. Realistically, you could do it without any tools, just a static page and some javascript.


----------



## beers (Jun 1, 2016)

[beers@fs ~]$ ./bash

[beers@fs ~]$ cat bash
for i in `seq -w 001 005`
do
echo "http://garbagedomain.com/inthebutt$i.mp4" >> list
done

[beers@fs ~]$ cat list
http://garbagedomain.com/inthebutt001.mp4
http://garbagedomain.com/inthebutt002.mp4
http://garbagedomain.com/inthebutt003.mp4
http://garbagedomain.com/inthebutt004.mp4
http://garbagedomain.com/inthebutt005.mp4


----------



## kenny1999 (Jun 1, 2016)

Cromewell said:


> Why are you doing this?
> 
> Check out http://www.seleniumhq.org/
> Alternatively, http://www.greasespot.net/
> ...


hi static page and javascript will also copy something useless , unrelated, crappy links....


----------



## kenny1999 (Jun 1, 2016)

beers said:


> [beers@fs ~]$ ./bash
> 
> [beers@fs ~]$ cat bash
> for i in `seq -w 001 005`
> ...


sorry but I don't know what u r talking about at tall


----------



## kenny1999 (Jun 1, 2016)

but I've found a great site at last. Hope this will help future comers

http://www.neodownloader.com/tools/link-builder/


----------



## Cromewell (Jun 2, 2016)

kenny1999 said:


> hi static page and javascript will also copy something useless , unrelated, crappy links....


Depends how you write it.

var base_url = "http://thisisanexample.com/";
var base_name = "ex";
var extension = ".zip";
var counter = 0;

for (counter = 0; counter <= 6000; counter++){
  var goto_url = base_url + base_name + ("0000" + counter).slice(-4) + extension;
  window.open(goto_url, '_blank');
}


----------



## beers (Jun 2, 2016)

kenny1999 said:


> sorry but I don't know what u r talking about at tall


It's just a shell script like in Linux that does what you're looking for.

Also see Cromewell's example.  Not sure how you can honestly make a 'javascript will create crappy links' statement when it completely depends on how the script is written.


----------

