Premium Only Content
This video is only available to Rumble Premium subscribers. Subscribe to
enjoy exclusive content and ad-free viewing.

Python - How to get file name from file path
1 year ago
2
How to get file name from file path in python
To extract the file name from a file path in Python, you can use the os.path.basename function from the os module or the Path.name attribute from the pathlib module.
Here's how you can do it with both methods
Using os.path.basename function
import os
file_path = '/path/to/your/file.txt'
file_name = os.path.basename(file_path)
print(file_name)
Loading comments...
-
1:37:15
CocktailsConsoles
6 hours agoBE PART OF THE GAME!!| Death Road to Canada | Cocktails & Consoles Livestream
36.4K1 -
1:04:29
BonginoReport
12 hours agoFDA Vax Pusher Needs to Look in the Mirror - Nightly Scroll w/ Hayley (Ep.16) - 03/31/2025
138K110 -
3:27:31
SquallRush
1 day agoBrawlhalla Mondays!
39.8K1 -
9:14:37
Misfit Electronic Gaming
11 hours ago $5.42 earned"LIVE" It's So Monday So lets Perk it up. Lets Earn Gears"Party Animals" & R.E.P.O. Who will join me????
59.2K -
54:13
Sarah Westall
11 hours agoCIA Disclosures: Ark of the Convenient, the Pyramid Code, Ley Lines & Earth’s Energy w/ Jason Shurka
102K25 -
1:16:28
Kim Iversen
12 hours agoThere Was No COVID Virus! How We've All Been Duped By The Medical Establishment
165K339 -
2:58:42
Crossplay Gaming!
8 hours agoLet's Check Out MORE Metroid Prime Remastered! (With the RTX 5090!)
50.1K3 -
14:24
AlaskanBallistics
17 hours ago $1.72 earnedMDT HNT26 Chassis on A Remington 700 7mm Remington Magnum
40.9K9 -
13:34
T-SPLY
12 hours agoCNN Is Now Accusing Trump Staff Of War Crimes
61K27 -
1:33:25
2 MIKES LIVE
12 hours ago2 MIKES LIVE #199 Deep Dive Monday!
47.2K5