How can i get the list of all file names in a directory?

This is the place for queries that don't fit in any of the other categories.

How can i get the list of all file names in a directory?

Postby dannyxy » Sat May 11, 2013 2:00 pm

How can i get the list of all file names in a directory?
dannyxy
 
Posts: 18
Joined: Fri Mar 29, 2013 11:26 am

Re: How can i get the list of all file names in a directory?

Postby hansn » Sat May 11, 2013 2:15 pm

Code: Select all
import os

os.listdir('PATH/')
hansn
 
Posts: 87
Joined: Thu Feb 21, 2013 8:46 pm


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot], W3C [Linkcheck] and 5 guests

cron