Python Forum
python print all files which contain specific word in it
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python print all files which contain specific word in it
#3
You should really use pathlib. It is much better than manipulating paths using os.

I think you are using glob wrong. Instead of making a pattern that includes the path, I think you should specify the path using the root_dir parameter.
Reply


Messages In This Thread
RE: python print all files which contain specific word in it - by deanhystad - Jan-25-2023, 06:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Help replacing word in Mutiple files. (SOLVED) mm309d 0 858 Mar-21-2023, 03:43 AM
Last Post: mm309d
  python move specific files from source to destination including duplicates mg24 3 1,133 Jan-21-2023, 04:21 AM
Last Post: deanhystad
  Failing to print sorted files tester_V 4 1,305 Nov-12-2022, 06:49 PM
Last Post: tester_V
  delete all files which contains word sql_Table1 mg24 2 887 Sep-15-2022, 10:05 PM
Last Post: mg24
  [GoogleTrans] How can i print my translation word ?... JamieVanCadsand 7 11,789 Aug-29-2021, 12:01 PM
Last Post: Melcu54
Question Problem: Check if a list contains a word and then continue with the next word Mangono 2 2,541 Aug-12-2021, 04:25 PM
Last Post: palladium
  Moving specific files then unzipping/decompressing christophereccles 2 2,393 Apr-24-2021, 04:25 AM
Last Post: ndc85430
  How to make a telegram bot respond to the specific word in a sentence? Metodolog 2 6,397 Dec-22-2020, 07:30 AM
Last Post: martabassof
  Searching for specific word in text files. JellyCreeper6 1 1,754 Nov-03-2020, 01:52 PM
Last Post: DeaD_EyE
  Find specific subdir, open files and find specific lines that are missing from a file tester_V 8 3,666 Aug-25-2020, 01:52 AM
Last Post: tester_V

Forum Jump:

User Panel Messages

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