Search code examples
pythonlinuxfilepython-3.xfilenames

Python3 list files from particular directory


How to list file names which are only from a particular directory? I don't want file names from sub-directory or anything.


Solution

  • os.listdir(dir)
    

    Also see List files in ONLY the current directory