Skip to content
Courses
DSA to Development
Get IBM Certification
Newly Launched!
Master Django Framework
Become AWS Certified
For Working Professionals
Interview 101: DSA & System Design
Data Science Training Program
JAVA Backend Development (Live)
DevOps Engineering (LIVE)
Data Structures & Algorithms in Python
For Students
Placement Preparation Course
Data Science (Live)
Data Structure & Algorithm-Self Paced (C++/JAVA)
Master Competitive Programming (Live)
Full Stack Development with React & Node JS (Live)
Full Stack Development
Data Science Program
All Courses
Tutorials
Data Structures & Algorithms
ML & Data Science
Interview Corner
Programming Languages
Web Development
CS Subjects
DevOps And Linux
School Learning
Practice
Build your AI Agent
GfG 160
Problem of the Day
Practice Coding Problems
GfG SDE Sheet
Contests
Accenture Hackathon (Ending Soon!)
GfG Weekly [Rated Contest]
Job-A-Thon Hiring Challenge
All Contests and Events
DSA
Practice Problems
Python
C
C++
Java
Courses
Machine Learning
DevOps
Web Development
System Design
Aptitude
Projects
Sign In
▲
Similar Topics
Web Technologies
40.3k+ articles
DSA
22.3k+ articles
Python
20.1k+ articles
Python Programs
4.1k+ articles
python-os-module
210+ articles
python-file-handling
110+ articles
Python file-handling-programs
82 articles
Volkswagen IT Services
58 articles
Python os-module-programs
28 articles
Python directory-program
26 articles
Python OS-path-module
32 posts
Popular Articles
Recent Articles
How to get file extension in Python?
Last Updated: 19 September 2023
In this article, we will cover How to extract file extensions using Python. How to Get File Extension in Python? Get File Extension in Pytho
...read more
Python
python-file-handling
Python OS-path-module
Python file-handling-programs
os.path.abspath() method - Python
Last Updated: 21 April 2025
The os.path.abspath() method in Python's os module is used to get the full (absolute) path of a file or folder. It's useful when you're work
...read more
Python
Python Programs
Python OS-path-module
Python directory-program
Get parent of current directory using Python
Last Updated: 13 October 2022
In Python, OS module is used to interact with the operating system. It comes under Python's standard utility modules. This module provides a
...read more
Python
python-file-handling
Python OS-path-module
Python file-handling-programs
Python os-module-programs
Similar Topics
Web Technologies
40.3k+ articles
DSA
22.3k+ articles
Python
20.1k+ articles
Python Programs
4.1k+ articles
python-os-module
210+ articles
python-file-handling
110+ articles
Python file-handling-programs
82+ articles
Volkswagen IT Services
58+ articles
Python os-module-programs
28+ articles
Python directory-program
26+ articles
Check if a File or Directory Exists in Python
Last Updated: 04 January 2025
To check how to check if a Directory Exists without exceptions in Pythonwe have the following ways to check whether a file or directory alre
...read more
Python
python-file-handling
Python OS-path-module
Python file-handling-programs
Delete a directory or file using Python
Last Updated: 26 November 2024
In this article, we will cover how to delete (remove) files and directories in Python. Python provides different methods and functions for r
...read more
Python
Python Programs
python-file-handling
Python OS-path-module
Python file-handling-programs
Python - How to Check if a file or directory exists
Last Updated: 24 April 2024
Sometimes it's necessary to verify whether a dictionary or file exists. This is because you might want to make sure the file is available be
...read more
Python
python-file-handling
Python OS-path-module
Python file-handling-programs
os.path.isdir() method - Python
Last Updated: 28 April 2025
os.path.isdir() method in Python checks whether the specified path is a directory or not. This method follows the symbolic link, which means
...read more
Python
python-os-module
Python OS-path-module
Python | os.path.dirname() method
Last Updated: 26 August 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This m
...read more
Python
python-os-module
Python OS-path-module
Python | os.path.basename() method
Last Updated: 21 August 2024
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This m
...read more
Python
python-os-module
Python OS-path-module
Python | os.path.relpath() method
Last Updated: 18 June 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This m
...read more
Python
python-os-module
Python OS-path-module
Python | os.path.join() method
Last Updated: 08 October 2024
The os.path.join() method is a function in the os module that joins one or more path components intelligently. It constructs a full path by
...read more
Python
python-os-module
Python OS-path-module
Python | os.makedirs() method
Last Updated: 15 January 2024
All functions in the os module raise OSError in the case of invalid or inaccessible file names and paths, or other arguments that have the c
...read more
Python
python-os-module
Python OS-path-module
Python | os.remove() method
Last Updated: 29 May 2019
OS module in Python provides functions for interacting with the operating system. OS comes under Python’s standard utility modules. This m
...read more
Python
python-os-module
Python OS-path-module
Python | os.mkdir() method
Last Updated: 16 January 2024
All functions in the OS module raiseOSErrorin the case of invalid or inaccessible file names and paths, or other arguments that have the cor
...read more
Python
python-os-module
Python OS-path-module
Python os.path.splitext() method
Last Updated: 20 March 2025
os.path.splitext() method is used to split the pathname into a pair (root, ext), where root is the part of the path before the file extensio
...read more
Python
python-os-module
Python OS-path-module
1
2
3
>>
Last
1
2
3
>>
Last
1
2
3
>>
Last
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !