Manual:MoveBatch.php: Difference between revisions
Appearance
Content deleted Content added
chg |
chg |
||
| Line 40: | Line 40: | ||
{{Note|1=<translate>Parameters need to be addressed with <code>--</code> and filled with <code>=</code> as shown in the example above.</translate>}} |
{{Note|1=<translate>Parameters need to be addressed with <code>--</code> and filled with <code>=</code> as shown in the example above.</translate>}} |
||
; <translate><!--T:25--> Windows</translate> |
; <translate><!--T:25--> Windows</translate> |
||
<translate> |
<translate> |
||
<!--T:26--> |
<!--T:26--> |
||
| Line 51: | Line 51: | ||
Command Code for batch moving will be like this: |
Command Code for batch moving will be like this: |
||
</translate> |
</translate> |
||
<syntaxhighlight lang="txt"> |
|||
\path\to\php.exe \path\to\moveBatch.php --u=user --r=reason --noredirects \path\to\listfiles.txt |
|||
</syntaxhighlight> |
|||
<translate> |
<translate> |
||
| Line 61: | Line 63: | ||
Pages name should be arranged like this: |
Pages name should be arranged like this: |
||
</translate> |
</translate> |
||
< |
<syntaxhighlight lang="txt"> |
||
Manual:Wiki Edit|Help:Wiki Edit |
Manual:Wiki Edit|Help:Wiki Edit |
||
Manual:Extensions|Help:Manual:Extension |
Manual:Extensions|Help:Manual:Extension |
||
Manual:How to use moveBatch.php|Help:How to use moveBatch.php |
Manual:How to use moveBatch.php|Help:How to use moveBatch.php |
||
</syntaxhighlight> |
|||
</source> |
|||
<translate> |
<translate> |
||
<!--T:36--> |
<!--T:36--> |
||
Revision as of 17:09, 3 March 2020
| MediaWiki file: moveBatch.php | |
|---|---|
| Location: | maintenance/ |
| Source code: | master • 1.46.0 • 1.45.4 • 1.43.9 |
| Classes: | 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.
Usage
| 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
- 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.txtfile. 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 keythen writecmdand pressEnter - 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 like this
C:\xampp\core\php55\php.exe C:\xampp\htdocs\mw\maintenance\moveBatch.php --u=user --r=reason --noredirects C:\xxx.txtThat's it!