Need Help With Action To Convert Track Formats

Hello all! I have the following action which I would like to preform on my music:

$if(%track%,C:\Users\Joe\Desktop\Music\\%artist%\\%album%\\%track% - %title%,C:\Users\Joe\Desktop\Music\\%artist%\\%album%\\%title%)

However, I need to do the following two things first while leaving the track fields of songs with blank track fields blank.

I would like to take out any leading zeros in the track data. For example, I would want to change "03" to just "3".

Additionally, I would like to convert all the track data stored in the format of "number/total track number" to just "number". For example I would want to change "7/14" to "7".

I have spent an hour or two trying to figure this out and I simply can't. Would anyone be kind enough to help me out? Any help is appreciated!:smiley:

If you want to re-write the filename, use
Convert>Tage-Filename
To limit the track number to just digits without padding use
$num(%track%,1)
This cuts out the "x of y" as well.