how to list all files in cmd code example Example: cmd files in directory Enter “dir” (without quotes) to list the files and folders contained in the folder.