Suppose I have 10 files generated by the system every day under D:\Temp. The names are RANDOMLY generated.
Assume I need to rename the oldest one to be 'aaa', the second oldest one to be 'bbb', then 'ccc', 'ddd' and so on.
assume these are the target names I will use:
Beijing
shanghai
hangzhou
suzhou
newyork
lanzhou
huzhou
guangzhou
tianjin
sichuang
Can someone help with a batch script to accomplish this?
I actually asked this question yesterday and was given a wonderful answer using PowerShell, but today I notice in company's VM I don't have PowerShell installed (not allowed to install by yourself), so need to post question again so that people who already answered can retain their (accept) votes.
dir /a-d
.