Skip to content

Tag Archives: Python file-handling-programs

In this article, we will code a python script to find duplicate files in the file system or inside a particular folder.  Method 1: Using… Read More
In this article, we are going to replace Text in a File using Python. Replacing Text could be either erasing the entire content of the… Read More
In this article, we will learn how we can replace text in a file using python. Method 1: Searching and replacing text without using any… Read More
In this article, we are going to see how to count words in Text Files using Python. Example 1: Count String Words First, we create… Read More
In this article, we are going to see how to delete the specific lines from a file using Python Throughout this program, as an example,… Read More
In this article, we are going to write a Python program to replace specific lines in the file. We will first open the file in… Read More
Prerequisite: DateTime module In this article, we are going to see how to create filenames with dates or times using Python.  Attention geek! Strengthen your foundations… Read More
In this article, we are going to see how to fetch and display lines containing a given string from a given text file. Assume that… Read More
A directory is capable of storing multiple files and python can support a mechanism to loop over them. In this article, we will see different… Read More
In Python, there are many methods available to this comparison. In this Article, We’ll find out how to Compare two different files line by line.… Read More
In this article, we are going to discuss various approaches to keep old content while writing files in Python. We can keep old content while… Read More
Prerequisite: File Handling os Python is a strong language which is extremely capable even when it comes to file handling. In this article, we will… Read More
In this article, we are going to discuss various approaches to get the size of a folder using python. To get the size of a… Read More
In this article, we are going to see how to search for a particular string in a text file. Consider below text File : Attention geek!… Read More
Directory also sometimes known as a folder are unit organizational structure in a system’s file system for storing and locating files or more folders. Python… Read More

Start Your Coding Journey Now!