|Description||Batch rename & upload of files to Commons|
|Formats supported||jpeg, png, gif, bmp|
|Running the script||Main page|
What is it?Edit
I, ShakataGaNai, wanted a batch uploading tool for Commons. While I'd previous used the Perl script, it didn't have the features I wanted. So I did what all half-assed coders do when they've got more time than common sense, I wrote my own (in PHP!). Basically it takes a directory, and a text file of the description, and uploads them under a serial name scheme (EX: "File:Some Longer Name Here - 0001.ext"). Of course after I completed the write, I found Nichalps updated upload script. If you want something more full featured, try his. If you've _got_ to have PHP, try mine.
!!!WARNING!!! -- This software is very very pre-alpha. It has very little in the way of error checking or logging, and has hardly been tested.
- 'Rename' on the fly
- Windows (Linux might work - not tested)
- PHP 5.X
How to RunEdit
- Save all 3 files (listed in the infobox) into the same directory
- In config.php update:
- Update description.txt
- Launch a command window
- cd to where those php scripts are
- Run: php phpmwupper.php
The 'UPLOAD_PREFIX' variable gets used to generate the 'final' file names. If you set it to 'A Cool Trip' your final file names will be 'File:A Cool Trip - 0001.ext'. The 0001 number starts at what ever 'START_NUMBER' is set to and is padded by 'PAD_DISTANCE'. The extension is defined by whatever the original file was (but translated into lower case).