Commons:GlobalReplace

From Wikimedia Commons, the free media repository
Jump to: navigation, search
GlobalReplace 0.3 in action

GlobalReplace is a simple tool designed to quickly find and replace files globally across Wikimedia Projects.

System Requirements[edit]

GlobalReplace is written in Java and can run on any operating system (e.g. Windows, Mac, Linux) with Java installed (most modern operating systems include a pre-installed version of Java). A minimum of Java 6+ is required to run this tool. Check your Java version and/or download the latest version here.

Download[edit]

Version 0.3[edit]

Running the Program[edit]

Most users need only double-click the program's icon to start it. In case this doesn't work for you, see the #Configuration Guide.

To use the tool, simply log-in, and include: the name of a file you want to replace (with or without the "File:" prefix), the name of the new file to replace the old file with, and an optional reason. Click the Start button to begin replacing files.

Configuration Guide[edit]

Mac[edit]

  1. Right click (or press & hold the control key while clicking) on the icon for GlobalReplace.jar in Finder.
  2. Select "Get Info", then select "Open with", and from the popup menu select "Other".
  3. In the window that appears, go to the folder /System/Library/CoreServices and select 'Jar Launcher'. Make sure the "Always Open With" checkbox is selected and click "Add".
  4. Click the "Change all" button so that any jar file will be opened automatically. Close the Info window and double click GlobalReplace.jar

Windows[edit]

See here

Disclaimer[edit]

This is a beta version of GlobalReplace, so it might contain bugs. By downloading and running this application, you accept responsibility for any mishap that may occur, whether it be your fault or any fault in the application. Please report bugs to me as soon as you discover them. Thanks!

FAQ[edit]

Q: Why didn't GlobalReplace replace all usages of a file?
A: There are several possible answers:
  • You don't have permission (the page was protected by a local sysop) to edit a page the file is linked on.
  • Some MediaWiki error prevented your edit from saving.
  • The file is embedded in a Template. Due to the intricacies some template authors introduce into their code, there is no one good way to automatically replace files in Templates. Unfortunately, these replacements must be performed manually.
  • The replacements did occur, but you need to first purge the cache of the file you were replacing.
Q: Is there an easy way to copy & paste file names into the tool?
A: Yes! GlobalReplace supports the copy & paste functions. If you're on Mac, use the keyboard shortcut Cmd + v to paste text. If you're on Windows, use the keyboard shortcut Ctrl + v to paste text.
Q: Some way to use this tool with proxy?
A: No. But you can use it with VPN.

See Also[edit]