Python Forum
How to access all xlsx files in all subdirectories?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to access all xlsx files in all subdirectories?
#2
glob.glob(r'C:\Users\igyulavics\Desktop\*.xlsx', recursive=True)
use recursive=True in glob

Note that you need to pass raw string if using backslash or escape the backslash or use forward slash in path
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: How to access all xlsx files in all subdirectories? - by buran - Mar-19-2019, 07:49 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  .py pandas matplotlib .xlsx files QubeStory 1 898 Mar-23-2023, 09:38 AM
Last Post: buran
  comparison of two xlsx files Jlyk 4 2,111 Sep-20-2021, 07:13 AM
Last Post: Jlyk
  Extracting information from .xlsx files hobbyist 0 1,676 Jan-06-2021, 07:20 PM
Last Post: hobbyist
  How to loop in python over subdirectories and copy the output to other subdirectories arielma 1 1,888 Oct-22-2020, 03:38 PM
Last Post: bowlofred
  Moving Files From Subdirectories To Another Directory Harshil 5 4,281 Oct-06-2020, 10:52 AM
Last Post: ndc85430
  Creating Excel files compatible with microsoft access vkallavi 0 1,652 Sep-17-2020, 06:57 PM
Last Post: vkallavi
  How to access files from shared folder? samandhare 4 43,194 Jun-25-2020, 11:14 AM
Last Post: samandhare
  How can I speed up my openpyxl program reading Excel .xlsx files? deac33 0 3,555 May-04-2020, 08:02 PM
Last Post: deac33
  Making .exe file that requires access to text and html files ClassicalSoul 0 1,654 Apr-23-2020, 05:03 PM
Last Post: ClassicalSoul
  Random access binary files with mmap - drastically slows with big files danart 1 4,101 Jun-17-2019, 10:45 AM
Last Post: danart

Forum Jump:

User Panel Messages

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