Python for Engineers
Solve Problems by Coding Solutions - A Complete solution for python programming
Blog Pages
Blog
News
Distributions
NumPy Tutorials
Self Learning
IDE
Packages
About
Showing posts with label
OS
.
Show all posts
Showing posts with label
OS
.
Show all posts
Python program to renaming the file or directory
# X is the original name and Y is the name to be changed
import os, sys
print ("The dir is: %s"%os.listdir(os.getcwd()))
os.rename("X","Y")
print ("Successfully renamed.")
print ("the dir is: %s" %os.listdir(os.getcwd()))
Older Posts
Home
Subscribe to:
Posts (Atom)