How Do I Change The Input On My Philips Tv Without A Remote

One of the things i am trying to do and am stuck on, is i want to get the file names of the files in a folder and print to an email (this part is done) however the next part i want to print in the email is the last modified date of the said files.