Manual:moveBatch.php

From MediaWiki.org
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
català • ‎Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎Nederlands • ‎polski • ‎português • ‎português do Brasil

Details[edit]

moveBatch.php file is a maintenance script to move (rename) a batch of pages. If the target page already exist it will fail with an error message.

Usage[edit]

Option/Parameter Description
-u <user> Username that will be shown in the log entries. If left empty, moves will be attributed to the user called Move page script.
-r <reason> Reason for moves. If empty, no reason will be shown in the logs.
-i <interval> Number of seconds to sleep after each move. If empty, defaults to 0.
<listfile> File should contain lines of text in the following format:
existing name 1|new name 1
existing name 2|new name 2
existing name 3|new name 3

Example[edit]

For Windows user

Suppose, A page called Manual:Wiki Edit was created in main namespace and we want to move it to Help: namespace. How to do that using moveBatch.php?
Command Code for batch moving will be like this: location of php.exe location of moveBatch.php --noredirects location of listfiles.txt

To Do

  • If you have local server, Run Apache+MySQL
  • Make list of pages you want to move and save as xxx.txt file. Pages name should be arranged like this-

Manual:Wiki Edit|Help:Wiki Edit
Manual:Extensions|Help:Manual:Extension
Manual:How to use moveBatch.php|Help:How to use moveBatch.php

  • Open your CMD (Command Prompt window). To open do this press windows key+R key then write cmd and press Enter
  • In CMD show where is your php.exe located, then show where is your moveBatch.php located and finally give where is your list file location

Filanl Command will be look like this C:\xampp\core\php55\php.exe C:\xampp\htdocs\mw\maintenance\moveBatch.php --noredirects C:\xxx.txt

That's it!