Important Notice:

Course Content
File Processing in Python (Chapter-11) M3-R5
About Lesson

Renaming File:

       Python file को rename करने के लिए os module provide करता है, जिसमें कुछ in-build (predefined) method होते हैं। python program में इस module का use करने के लिए सबसे पहले os module को import करना पड़ता है।

       Rename function का प्रयोग file के नाम को change करने के लिए किया जाता है।

Syntax:-          os.rename(“old_file_name”, “New_file_Name”)

 

Renaming File:

       Python provides the os module for renaming files, which contains some in-build (predefined) methods. To use this module in python program, firstly the os module has to be imported.

Rename function is used to change the name of the file.

Syntax:-          os.rename(“old_file_name”, “New_file_Name”)

 

error: Content is protected !!