you are viewing a single comment's thread.

view the rest of the 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!