How to List only regular file names in a directory on Linux and Windows Listing regular files in a directory…