Tutorials
Courses
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
32.7K+ articles
Python
20.0K+ articles
Python Programs
3.8K+ articles
python-utility
680+ articles
python-os-module
224+ articles
python-file-handling
124+ articles
Python file-handling-programs
82+ articles
Python OS-path-module
32+ articles
Python directory-program
26+ articles
Python OS-file-module
2+ articles
Python os-module-programs
28 posts
Recent Articles
Popular Articles
Get number of characters, words, spaces and lines in a file - Python
Last Updated: 24 February 2025
Given a text file fname, the task is to count the total number of characters, words, spaces, and lines in the file. As we know, Python provides multiple in-built features ...
read more
Python
Programming Language
Python Programs
Write From Home
python-file-handling
python-os-module
Python file-handling-programs
Python os-module-programs
Python - Get file id of windows file
Last Updated: 28 April 2025
File ID is a unique file identifier used on windows to identify a unique file on a Volume. File Id works similar in spirit to a inode number found in *nix Distributions. S...
read more
Python
python-utility
python-os-module
Python os-module-programs
Python - Get list of running processes
Last Updated: 28 April 2025
A Process is a program that is being executed (processed). A process may not have to be one run explicitly by the user, it could be a system process spawned by the operati...
read more
Python
python-utility
python-os-module
Python os-module-programs
Finding the largest file in a directory using Python
Last Updated: 29 December 2020
In this article, we will find the file having the largest size in a given directory using Python. We will check all files in the main directory and each of its subdirector...
read more
Python
Write From Home
python-file-handling
python-os-module
Python os-module-programs
Kill a Process by name using Python
Last Updated: 30 June 2021
A process is identified on the system by what is referred to as a process ID and no other process can use that number as its process ID while that first process is still r...
read more
Python
python-utility
python-os-module
Python os-module-programs
Rename a folder of images using Tkinter
Last Updated: 30 December 2021
Prerequisites: Python GUI – tkinter, os.listdir() method, os.rename() methodIn this article, the task is to rename a batch of images using Python. Now say given n images i...
read more
Python
python-os-module
Python-tkinter
Python Tkinter-exercises
Python os-module-programs
Getting the time since OS startup using Python
Last Updated: 16 June 2021
Uptime is the time elapsed since the Operating system started. Operating systems have discrete mechanisms to keep track of this time, which they further utilize for perfor...
read more
Python
python-utility
python-os-module
Python os-module-programs
Menu Driven Python program for opening the required software Application
Last Updated: 07 November 2022
In this article, we will create a menu-driven Python program which will execute the required user tool when user will give the input as a text.We can interact to OS throug...
read more
Python
Python Programs
python-utility
python-os-module
Python os-module-programs
Open computer drives like C, D or E using Python
Last Updated: 29 December 2020
Have you ever wondered that you can open your drives by just typing C, D or E and then that drives are open.This can be possible by using Python. So, for performing this t...
read more
Python
python-utility
python-os-module
Python os-module-programs
Python Script to change name of a file to its timestamp
Last Updated: 09 February 2023
A Digital Timestamp is a sequence of characters(usually a combination of digits and delimiters), identifying the time when a certain event occurred. In computer science, t...
read more
Python
python-utility
python-os-module
Python os-module-programs
Menu driven Python program to execute Linux commands
Last Updated: 29 December 2020
Linux is one of the most popular operating systems and is a common choice for developers. However, it is difficult to remember the vast range of commands that Linux suppor...
read more
Python
Python Programs
python-utility
python-os-module
Python os-module-programs
How to get file creation and modification date or time in Python?
Last Updated: 15 March 2024
We often need to access various file properties for different purposes. Among the file properties, the creation and modification time of a file are the most commonly used ...
read more
Python
Picked
python-os-module
Python os-module-programs
Python Program to Get the File Name From the File Path
Last Updated: 21 August 2024
In this article, we will be looking at the program to get the file name from the given file path in the Python programming language. Sometimes during automation, we might ...
read more
Python
Python Programs
Picked
python-os-module
Python directory-program
Python os-module-programs
Write Os.System Output In File Using Python
Last Updated: 28 April 2025
Python is a high-level programming language. There are many modules. However, we will use os.system module in this Program. This module provides a portable way of using op...
read more
Python
Python Programs
Picked
Python os-module-programs
How to use OS with Python List Comprehension
Last Updated: 28 April 2025
One such module is the 'os' module, which allows interaction with the operating system. When combined with list comprehensions, the 'os' module becomes a potent tool for h...
read more
Python
Python Programs
Picked
Python list-programs
Python os-module-programs
1
2
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 !