Name my tracks xx/xx.

You want to reset the track counter for each folder?
This is what the interactive track number assistant can do already.

You want to mimic this behaviour by using an action?
Then read there ...
Tracknummern in Aktionen
That is a 2-step process, with detour and help of an export script.

DD.20150308.2238.CET