Script method

The script method is probably the most advanced feature of Advanced Renamer. With this method a JavaScript experienced user can extend Advanced Renamer by writing custom methods right in the program. As with any method, the script method can be saved and opened by any other user on any other computer. Write the script in the text box and click Apply Script to see the result in the file list. The Pre Batch Script button can be used to setup prebatch variables.

Important resources:
JavaScript Reference
JavaScript Guide

How to use
The script in the method panel will get executed once for every file or folder in the list in the order the files are sorted in the list. The parameter "index" contains the number the item in the list has. The parameter "item" is an object representing an item in the list and contains every piece of information Advanced Renamer knows about this file or folder. The information can be used to create a new filename which will be set by returning the new filename. Remember the new filename must contain the extension of the file.