Last modified on 11 December 2014, at 20:48

Commons talk:GlobalReplace


From what I see from the screenshot, a reason-field is missing. And how does it deal with CAPTCHA, Ratelimits, Blacklists, Blocks and Protections etc.? -- Rillke(q?) 00:33, 15 June 2013 (UTC)

The reason field is automated, and it looks like 's1' -> 's2' using GlobalReplace v0.1a - Fastily's PowerToys, where s1 and s2 is the old filename and new filename respectively. I can add an optional reason field in a future release, though I do not view it as an urgently required fix. It's single threaded, so I don't think it can make more than 10 edits a minute max, and that's only if the servers are responding quickly. If the application encounters a captcha, blocklist, block, protection, some exception situation, etc, it skips the page. -FASTILY 01:13, 15 June 2013 (UTC)
Thanks a lot. Can you summarize the advantages over MediaWiki:Gadget-GlobalReplace.js which is used by the move&replace link by AjaxQuickDelete? (except that it runs in Java so not depending on browser's x-domain-requests implementation differences), please? Also, I would really appreciate seeing the source code (out of curiosity of course). -- Rillke(q?) 08:05, 15 June 2013 (UTC)
I neither use MediaWiki:Gadget-GlobalReplace.js, nor did I write this tool as a replacement for it. I originally created the tool for my own use, and thought others could benefit from having it as well, which is why I published it. As mentioned at User:Fastily/GlobalReplace#Source, I have not published the source code. In the future perhaps, but not at the moment. -FASTILY 10:53, 15 June 2013 (UTC)
Jup, a small reason field which allows the user to give additional info is missing. Also you could drop the code on github or any similar site to allow users to easily read and modify the source. --McZusatz (talk) 09:02, 15 June 2013 (UTC)

Test result replacing COAs and mapsEdit

First of all many thanks for a smart tool that saves us (Juergenk59 and me) nights and hours. :) Our first experiences (replacing File:Wappen bergkamen.png>File:DEU Bergkamen COA.svg - File:DEU Holzwickede COA.png>File:DEU Holzwickede COA.svg) and results are overwhelming. Only if the target name of the file to be replaced contains one or several "_" instead of "blank" (as it was on the polish and hungarian wiki) it wont replace. Is it possible to convert "_" to a "blank"within a filename automatically?

While trying to replace File:Bergkamen-Ortsteile.jpg>File:Verwaltungsgliederung Bergkamen.svg at hungarian wiki we found the string [[Fájl:Bergkamen-Ortsteile.jpg|333 px]] which was ignored.

Having started the app we missed some kind of an indicator like a progress bar reporting or simply a message that the app is busy executing the task. Is it possible to have an Information? --Maxxl2 - talk 08:04, 16 June 2013 (UTC)

I'm glad you found it useful! I revised the regex matching patterns to account for underscores and spaces in version 0.2. Hopefully that fixes the first issue. I'm afraid the only output the program produces at the moment is command line output. I'll add in a progress bar in a future version. Regards, FASTILY 07:09, 17 June 2013 (UTC)
Just a short comment: Please refrain from using it with high-usage images, I had to undo changes to Düsseldorf Wappen because it was not replaced in many Wikis. The tool has to be improved so it doesn't forget any usage. --Denniss (talk) 10:51, 17 June 2013 (UTC)
Unfortunately you intervened in the middle of a double-action process: renaming the file and replacing the name. Applying the tools delinker and global replace where the delinker failed was on the way when you spoiled the action reverting the renaming. I hope you are are willing to revert your intervention and give way to use the latest svg-image globally as intended.--Maxxl2 - talk 14:19, 17 June 2013 (UTC)
You dos not hav global rights (skip captcha, noratelimits, atopatrolled, GR etc.). Is not a good idee to replace hig-used fiels with yor account. Regards--Steinsplitter (talk) 18:51, 17 June 2013 (UTC)


Files used at Wikimedia Commons seem not to be replaced. Is this wanted? --McZusatz (talk) 07:50, 17 June 2013 (UTC)

Yes, this was deliberate. Would it be useful to replace files locally? -FASTILY 08:09, 17 June 2013 (UTC)
Only in galleries as far as I can think of. --McZusatz (talk) 08:21, 17 June 2013 (UTC)


Would it be possible to made the source code publicly available, maybe with a Free license? --Ricordisamoa 10:50, 17 June 2013 (UTC)

It's in the works. I'm currently preparing to migrate my library to github, but that's going to take some time. -FASTILY 20:18, 17 June 2013 (UTC)

The author said, decision about whether to publish or not was not yet done. I think as long as it isn't published, the term closed source is correct. The author has a different view. What's you opinion, Ricordisamoa? -- Rillke(q?) 15:55, 17 June 2013 (UTC)

I have a GitHub repo, but it doesn't contain all of my scripts yet: thus, I understand and respect Fastily's temporizing. However, I'd prefer the source code of anything so potentially harmful to be public. --Ricordisamoa 05:20, 19 June 2013 (UTC)
...And yes, "closed source" is the correct term (may "temporarily closed source" be more appropriate?) --Ricordisamoa 05:23, 19 June 2013 (UTC)
Yes, agreed. I just want to highlight that I don't expect something malicious in it but there could be programming flaws and replacement is done under one's user account. That's why I think open source would be an excellent choice. -- Rillke(q?) 09:35, 20 June 2013 (UTC)
Agreed: especially in beta-phase, we could improve it together and build a complete emergency-replacement for CommonsDelinker (with flagged bots only, of course). --Ricordisamoa 09:59, 20 June 2013 (UTC)

Delinker doesn't work correctEdit

Hi, he doesn't work correct. He delete the File. (diff). Also postet here. Cheers --Knochen ﱢﻝﱢ‎  21:15, 17 July 2013 (UTC)

Pictogram voting info.svg Info --Steinsplitter (talk) 07:50, 18 July 2013 (UTC)

Option doesn't workEdit

The option "Ignore User & Project space" doesn't work for me!? I used it it several times and it also replaced always in User & Project space. -- Perhelion (talk) 15:00, 18 August 2013 (UTC)

Can´t loginEdit

Hello, I can´t login - tried several times on two laptops -- newest Java is installed - Please help!--Juergenk59 (talk) 16:34, 1 September 2013 (UTC)

Same problem here. Using v0.2a. Huntster (t @ c) 23:56, 3 September 2013 (UTC)
+1 : I've nothing changed. -- Perhelion (talk) 14:36, 6 September 2013 (UTC)
I am not sure but this sounds like an upsteam bug. Due to the recent changes in the login system I recommend to update the wiki java lib. However, the source code of GlobalReplace is not available, so there is nothing we can do about that, unfortunately. --McZusatz (talk) 21:43, 7 September 2013 (UTC)
I'll work on an update and try to post it soon. The recent changes in the login system are to blame. By the way, the source code is here -FASTILY 01:03, 8 September 2013 (UTC)
Your tool was very well! I hope it works as early as possible...--Juergenk59 (talk) 09:43, 14 September 2013 (UTC)
Thanks for the input everyone. I have just uploaded the patched version, and it's available via the same download links. This version requires a minimum of Java 7 to run, so please update your Java run-time environment if you haven't already done so! -FASTILY 03:32, 16 September 2013 (UTC)
I've an error:: -- Perhelion (talk) 08:54, 16 September 2013 (UTC)
::: Exception in thread "main" java.lang.UnsupportedClassVersionError: fbot/tools/
/GlobalReplace : Unsupported major.minor version 51.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(Unknown Source)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at Source)
        at Source)
        at$000(Unknown Source)
        at$ Source)
        at Method)
        at Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: Program will exit.
That's rather bizarre, I can't recreate that error. At what stage does this occur at? What OS are you using? -FASTILY 22:43, 16 September 2013 (UTC)
That errror only occurs if I start with the GlobalReplace.bat (batch-file). I use Windows 7 64x and Java 7 64-bit. (I've posted now the full error msg). So it works now! Many thanks! -- Perhelion (talk) 08:02, 17 September 2013 (UTC)
Thanks Fastily for getting this running again. It really is a fantastic tool. By the way, do you know of any replacement, or know who I might talk to regarding the replacement, of Erwin85's excellent category scanning Related Changes tool? He is no longer active, and I'd hate to lose this capability when Toolserver goes away (or decides to simply fail, as it is doing now). Huntster (t @ c) 05:49, 17 September 2013 (UTC)
Now it works fine for me! Thank you very much too for your great work!--Juergenk59 (talk) 13:39, 17 September 2013 (UTC)

command lineEdit

Hi Fastily, I am not a very good technical person so I'm coming to you for a question about this tool. I downloaded and started the .bat file and I get a message that says this: "java is not recognized as an internal or external command, operable program or batch file. Program appears to have exited." I was wondering if this is because I signed on the users page not too long ago. I have Windows 8 and use a pc. Thank you for making this tool available, it really saves a lot of time and work! --South19 (talk) 05:00, 29 October 2013 (UTC)

Okay nvm,I think it worked; the image has been replaced! --South19 (talk) 05:10, 29 October 2013 (UTC)
It sounds like you don't have Java installed on your computer. See here for instructions on getting Java set up -FASTILY 07:05, 7 November 2013 (UTC)


Hallo. I just saw, that the tool on the upper sorbian help page about user boxes‎‎ didn't change an image, but changed &lt;noinclude&gt; and &lt;/noinclude&gt; into <noinclude> and </noinclude>. Look at the edit of the user Juergenk59 before my correction: [1]. Why? Is this a bug or a feature? Greetings --Tlustulimu (talk) 19:40, 5 March 2014 (UTC)

This was a known bug in version 0.2. GlobalReplace has since been updated to v0.3, which resolves this issue. -FASTILY 03:13, 7 March 2014 (UTC)

Option missing excludeEdit

Hello master Fastily, I wondering that the new version 0.3 has no more the option "Ignore User & Project space". I guess from performance reasons or it does not work properly? I think it's a great pity, because you always have to revert some pages now. :-/ (forget all my previous inappropriate words) Most are still in archives, discussion pages of projects or upload-galleries of users. Best regards -- Perhelion (talk) 11:12, 8 March 2014 (UTC)

Hi Perhelion, I removed that feature because it did not work properly on all Wikis. I'll definitely look into recoding that function into the next version of GR. Regards, FASTILY 22:40, 8 March 2014 (UTC)
Symbol support vote.svg Support I vote it for high priority, because it gives many anger!! Please, thanks in advance (even it's only beta or work on some Wikis)!Face-sad.svg -- Perhelion (talk) 09:11, 17 May 2014 (UTC)
Symbol support vote.svg Support Give it a go. At present we annoy users replacing their own designs on their user pages and destroy history about various designs on talk pages. We need the exclusion selector urgently. --Maxxl2 - talk 10:19, 17 May 2014 (UTC)
Symbol support vote.svg SupportYes, I agree with Perhelion and Maxxl2. Some users have a list of own uploads on their pages. It makes now sence to replace this files with ours.--Juergenk59 (talk) 19:17, 24 May 2014 (UTC)

This suggestion needs to be implemented as soon as possible, not just with the next version. I had to warn an editor on en.Wikipedia a few days ago after I found 17 instances where he has used Global Replace to edit archived posts and/or posts made by others. A few minutes ago I warned another for making similar edits. --AussieLegend () 15:30, 25 May 2014 (UTC)

Dropbox download missingEdit

I can no longer download the programme from dropbox. Sodacan (talk) 02:12, 16 April 2014 (UTC)

Oops, I must have accidentally deleted the file. It should be working now! -FASTILY 06:20, 17 April 2014 (UTC)
Thanks! Sodacan (talk) 08:12, 17 April 2014 (UTC)


For the purpose of things like Commons:Deletion requests/File:County Flag of Northamptonshire.png, a CommonsDelinker that removes files from the various wikipedias before deletion would be useful. Can GlobalReplace do that, or, if not, is not possible to add such a feature?--Antemister (talk) 14:42, 18 April 2014 (UTC)

Sure, I could add a feature like that into the next version -FASTILY 08:50, 20 April 2014 (UTC)


Is there a place where I can request a file be globally replaced without having to bother downloading the tool myself? I'd like File:Flag of Honiara City.png to be replaced with the version File:Flag of Honiara.svg since the former is the flag of the city council, not of the city itself. SiBr4 (talk) 22:38, 22 April 2014 (UTC)

Not as far as I'm aware. -FASTILY 07:30, 23 April 2014 (UTC)
I've just replaced them all manually. Too bad there isn't. SiBr4 (talk) 13:38, 23 April 2014 (UTC)
There'd be User_talk:Sreejithk2000/JustReplace.js#Install. Make sure not to use CommonsDelinker by ticking the check-box. --McZusatz (talk) 12:21, 18 May 2014 (UTC)
Thanks, but what exactly does that script do? Is it an on-wiki version of GlobalReplace? That is what it appears to be, though I'm not familiar with Javascript. SiBr4 (talk) 15:14, 18 May 2014 (UTC)
It replaces up to 45 usages when you confirm in the web-dialog that appears after pressing the Global replace" in the dropdown menu. If it didn't manage to complete the task, you can run it again to substitute the remaining image usages, AFAIK. -- Rillke(q?) 15:40, 18 May 2014 (UTC)
Also you should revert all edits done by the JustReplace.js on Commons as they are mostly destructive and at best irrelevant. --McZusatz (talk) 20:33, 18 May 2014 (UTC)

User warning noticeEdit

I've noticed that this tool has been used recently to make en masse changes, replacing PNGs with SVGs despite Commons:Transition to SVG clearly stating "PNGs should not just be replaced en masse the instant an SVG replacement becomes available. It is often sufficient to label the image description page with a {{vector version available}} tag, and it will be migrated over to the SVG version by editors where appropriate." Perhaps a warning notice to this effect could be added to the user interface. --AussieLegend () 16:46, 25 May 2014 (UTC)

Request: additional check required (Bug)Edit

If you replace (a small) image which was sometimes inserted with no size declaration with a greater image you get a strong faulty result: uk:SVG-edit, pt:SVG-edit User: Perhelion10:36, 21 June 2014 (UTC)


It would be nice if this page would be prepared for translations in order to make it easier for local communities to understand what it does. Jopparn (talk) 21:25, 21 June 2014 (UTC)

Bug? (2)Edit

See how the image is displayed before and after: --Putumayo2 (talk) 23:19, 5 August 2014 (UTC)

It's a duplicate report of #Request: additional check required (Bug) User: Perhelion (Commons: = crap?)23:30, 5 August 2014 (UTC)
Okay, I just created another dupe of this bug report on m:User_talk:T.seppelt. –Be..anyone (talk) 12:36, 4 December 2014 (UTC)
As far as I am aware, given the variable ways people implement templates, there is no easy way to tell how large any given image is being rendered. I'll poke around the MediaWiki API in the meantime, but I'm not sure if there's a good solution for this. -FASTILY 07:33, 11 December 2014 (UTC)
No, I strongly recommend don't try to fix Templates, only image inclusions. If a Template is affected it is the best way to see the fault and fix this manually (by whomever). BTW: good to see you here again after some time... User: Perhelion (Commons: = crap?)  12:00, 11 December 2014 (UTC)
Sorry, should have been more clear. As you can see from the FAQ, the tool omits anything in the Template namespace. The problem is with the way template writers define their templates' parameters, which has the potential to skew or oddly resize images of varying dimensions without some manual tweaking. Consider the following three example scenarios:
1) A map infobox template takes an image, like so, and displays it at a hardcoded 200px.
{{Infobox Map
|Image = File:TestImage.jpg
2) A map infobox template takes an image, like so, and accepts the built-in MediaWiki image scalar directives.
{{Infobox Map
|Image = File:TestImage.jpg|83px
3) A map infobox template takes an image, like so, which allows users to specify image size via parameters
{{Infobox Map
|Image = File:TestImage.jpg
|width = 200
|height = 500
To further complicate matters, there are virtually an infinite number of ways to define templates, and parsing text to try to guess the image size is a horrible and error prone approach. Like I said before, I can try to resolve this programmatically via the API (I don't know if such functionality even exists), but to be honest, I just don't recommend wholesale replacement of raster images with vector graphics without going back and first checking the edits you made. -FASTILY 20:46, 11 December 2014 (UTC)

Get blocked indefinite (single file)Edit

By the way I have been blocked without any notification on a Wiki[2] (by user: C3r4) "bot without flag"! Greetings User: Perhelion (Commons: = crap?)16:22, 7 August 2014 (UTC)

Well, GIF → SVG, yes, this is not only pure maintenance work and needs to be approved by the wikis. -- Rillke(q?) 17:41, 7 August 2014 (UTC)
By the way, this could maybe be a little political background, because this last "mass" replacement was a Croatian flag on this Bosnian Wiki. By the way, this "mass replacement" seems a weakness on this local Wiki to be due to the substitution or miss-use of templates, because this was a single file replacement with 384 edits (I've there only 9 other edits) User: Perhelion (Commons: = crap?)18:23, 7 August 2014 (UTC)
  • Conclusion!?
Everyone with expensive use of this tool need a second account with bot-flag!? Robot icon.svg User: Perhelion (Commons: = crap?)19:09, 7 August 2014 (UTC)
Better use CommonsDelinker for these kind of mass replaces. Maybe there should be an option in the replacer tool to throttle the edits to a certain limit per minute in the same wiki. --Denniss (talk) 19:28, 7 August 2014 (UTC)
Thanks for the comparison, I've now used the GlobalReplace JS-Gaddget (JustReplace.js with CommonsDelinker) and I got now on the PL.WP autochecked user rights for the same bot work.[4] User: Perhelion (Commons: = crap?)17:57, 8 August 2014 (UTC)
Keep in mind you can't do PIXEL->SVG replacements with CommonsDelinker. --McZusatz (talk) 11:30, 10 August 2014 (UTC)
Hello McZusatz, where does it stays? User: Perhelion (Commons: = crap?)19:00, 10 August 2014 (UTC)
I'm sure there is no any political background about this. User: Perhelion doesn't have bot flag for this mass replacement or even doesn't ask anyone for temporal flood flag. Because of that I've blocked him. CommonsDelinker working as usual on without any problems, the same sort of replacement. If any sort of help on is needed, please contact me on my local talk page --C3r4 (talk) 08:54, 11 August 2014 (UTC)
I've deblocked him, please ask for temporary flood flag to grant him before the replacement. Best regards--C3r4 (talk) 08:51, 17 August 2014 (UTC)
Thank you. Anyway the insert of such huge amount, without any template is very very unusual. Maybe your Wiki need more technical know-how!? User: Perhelion (Commons: = crap?)14:09, 17 August 2014 (UTC)
Well, I'm not technical guy but I'm sure that many of people on knows how to deal with it. But that's off-topic for this place. Anyway, please don't hesitate to ask anything on my talk page.--C3r4 (talk) 05:57, 18 August 2014 (UTC)

Edited Sites automaticly on watchlistEdit

Hello everyone, this tool is very useful. But all sites which were edited by GlobalReplace are automaticly on my watchlist. Can you change it? This is very annoying! --T.seppelt (talk) 14:43, 23 November 2014 (UTC)

Unless your account is locally or globally flagged as a bot, no. Regards, FASTILY 07:33, 11 December 2014 (UTC)
Return to the project page "GlobalReplace".