#1 : 20/10-18 12:46 Simonetos The Greek
Posts: 2
|
I want to make a script which will replace the last letter of a filename, to its corresponding alphabet number. For example from "Filename AA" to "Filename A1". Any idea how on can I do that?
Thank you in advance!!! |
#2 : 20/10-18 17:00 David Lee
Posts: 1125
|
Reply to #1:
str=item.name; num=str.toUpperCase().slice(-1).charCodeAt(0) - 64; if (num>0 && num < 27) str = str.slice(0, str.length - 1) + num; return str; |
#3 : 21/10-18 11:30 Simonetos The Greek
Posts: 2
|
Reply to #2:
Thank you my friend, it worked 100%!!! |