Handbuch:MoveBatch.php
MediaWiki-Datei: moveBatch.php | |
---|---|
Speicherort: | maintenance/ |
Quellcode: | master • 1.38.1 • 1.37.2 • 1.35.7 |
Klassen: | MoveBatch |
Details
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.
Verwendung
Option/Parameter | Beschreibung |
---|---|
-u <Benutzer> |
Benutzername, der in den Log-Einträgen angezeigt wird. Wenn leer, wird der User "Move page script" verwendet. |
-r <reason> |
Gründe für das Verschieben. Wenn leer, wird kein Grund in den Logs angezeigt. |
-i <interval> |
Number of seconds to sleep after each move. If empty, defaults to 0. |
--noredirects | Suppress creation of redirects |
<listfile> |
Datei sollte Zeilen im folgenden Format enthalten:
existing name 1|new name 1
existing name 2|new name 2
existing name 3|new name 3
|
Example
- Linux
php /path/to/moveBatch.php --u=user --r=reason --noredirects /path/to/listfile.txt
Parameters need to be addressed with
--
and filled with =
as shown in the example above.- Windows
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:
\path\to\php.exe \path\to\moveBatch.php --u=user --r=reason --noredirects \path\to\listfiles.txt
- 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
Command will be look e.g. like this:
C:\xampp\core\php55\php.exe C:\xampp\htdocs\mw\maintenance\moveBatch.php --u=user --r=reason --noredirects C:\xxx.txt
That's it!