Python Forum
scandir() recursively and return path + filename
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
scandir() recursively and return path + filename
#5
(May-09-2018, 01:31 PM)malonn Wrote: @snippsat. I hadn't even looked at "walk()" because the docs say how much more efficient scandir() is.
os.walk() also use scandir PEP 471.
Quote:As part of this proposal, os.walk() will also be modified to use scandir() rather than listdir() and os.path.isdir().
This will increase the speed of os.walk() very significantly (as mentioned above, by 2-20 times, depending on the system).
Reply


Messages In This Thread
RE: scandir() recursively and return path + filename - by snippsat - May-09-2018, 01:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Modifying a dictionary recursively SpongeB0B 2 290 May-12-2024, 04:09 PM
Last Post: Gribouillis
  How to return the next page from json recursively? sandson 0 1,232 Apr-01-2022, 11:01 PM
Last Post: sandson
  Help Needed | Read Outlook email Recursively & download attachment Vinci141 1 4,187 Jan-07-2022, 07:38 PM
Last Post: cubangt
  WebDriverException: Message: 'PATH TO CHROME DRIVER' executable needs to be in PATH Led_Zeppelin 1 2,282 Sep-09-2021, 01:25 PM
Last Post: Yoriz
Star Recursively convert nested dicts to dict subclass Alfalfa 1 2,985 Jan-22-2021, 05:43 AM
Last Post: buran
  Get the filename from a path 12237ee1 7 3,686 Jul-13-2020, 06:01 PM
Last Post: 12237ee1
  Python script that recursively zips folders WITHOUT nesting the folder inside the zip umkc1 1 2,976 Feb-11-2020, 09:12 PM
Last Post: michael1789
  How to get full path of specified hidden files matching pattern recursively SriRajesh 4 4,085 Jan-18-2020, 07:12 PM
Last Post: SriRajesh
  Find a given file recursively inside a directory alinaveed786 1 2,007 Jul-01-2019, 01:53 PM
Last Post: ichabod801
  Return all Path value from function Palerm0_24 2 2,616 Mar-18-2019, 03:09 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020