I have a folder containing seven .txt files with random filenames, but each file is a different file size.
Using a batch, I'd like to rename these seven files according to a naming scheme that depends on the relative sizes of the files. That is, the smallest file gets renamed "A", the next smallest "B", and so on to "G."
How do I sort these files according to their sizes, then rename them to achieve the desired order? The final product should be the original folder containing seven files labaled A to G in size order.
Complete code would be appreciated.