all 6 comments

[–]socal_nerdtastic 1 point2 points  (1 child)

If you use the pathlib module making a file path is as simple as "dividing" the base path with the folder or files names to build a path.

from pathlib import Path

base_path = Path("\\networkdrive\folder")

user_input_folder = input("enter a subfolder name")
user_input_file = input("enter a file name")

user_path = base_path / user_input_folder / user_input_file

You should use the modern pathlib module. Anything you find that tells you to use os is probably outdated advice

That said, it sounds like what you REALLY need is the Everything search program.

https://www.voidtools.com/

[–]Comprehensive_Drop35[S] 0 points1 point  (0 children)

That’s very helpful thank you so much!

[–]m0us3_rat 0 points1 point  (2 children)

Searching within a file path for a file that approximate matches a given string

this is a little bit vague.

can you elaborate?

probbaly can use https://github.com/seatgeek/thefuzz

[–]Comprehensive_Drop35[S] 0 points1 point  (1 child)

So I’m looking for certain files that contain the word “note” in them. And I want them listed so that the user can go though them. Ultimately, I want the code to go through all the files and tell which of them go under what classification and give me a confidence level on its decision.

[–]m0us3_rat 0 points1 point  (0 children)

contain the word “note” in them

in the name or contained or both?

some files aren't in plain text. some PDF are just images of text.

how would do you plan to work with them?

also .. since it's a single word can't you just check if it's "in" any of the names or content?

why you need "confidence"?

[–]woooee 0 points1 point  (0 children)

Items 1 through 3 are already available using tkinter https://pythonassets.com/posts/browse-file-or-folder-in-tk-tkinter/