using System;
using NeonScripting;
using System.Collections;
using System.IO;
using System.Text;
using System.Linq;

public class Script
{
	public bool Run(INeonScriptHost host)
	{
		var idx = 1;
		foreach(var track in host.Tracks) 
		{
			host.UpdateProgress(string.Format("File {0}", idx));
			var newFilename = host.RemoteCalls.TagToFilename(track, "{{track(2)}}-{{artist}}-elf");
			host.RemoteCalls.RenameFile(track, newFilename);
			idx++;
		}
		host.RemoteCalls.CommitAllChanges(host.Tracks);
		
		return true;
	}
}