Wikimedia Git repository has this file:
The movepages.py script is used to move pages.
||The page to move from and the page to move to.|
||Leave no redirect behind.|
||Move pages by adding a namespace prefix to the names of the pages. (Will remove the old namespace prefix if any). Argument can also be given as |
||Do not move page's talk page (if it exists).|
||Don't prompt to make changes, just do them.|
||Skip redirect pages (Warning: increases server load)|
||Prompt for a custom summary, bypassing the predefined message texts. Argument can also be given as |
||Read pairs of file names from a file. The file must be in a format:
[[frompage]] [[topage]] [[frompage]] [[topage]]
Argument can also be given as
- Copy the list of the current pages, for example with Special:PrefixIndex.
- Paste it in the first column of a spreadsheet (eg: OpenOffice Calc).
- Create the second column with the same number of lines, with some characters which won't be present neither in the old pages names nor in the new (eg: "string to replace after by \n").
- Paste your new pages names (converted in ASCII) into the third column.
- Copy the three columns into a file (eg: called "articles_pairs.txt").
- Search and replace with your text editor (eg: Notepad++), the second column content by the carriage return (\n) (Tip: In notepad++ which trying to replace with \n enable the option regex in the replace dialogue box).
python movepages.py -lang:fr -family:wikibooks -pairsfile:"articles_pairs.txt" -noredirectwill produce the wanted result.