Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- filepath = 'C:/Any/file/Path'
- filename = input("Enter your file name : ")
- fileextention = input("Enter your extension : ")
- fn = filename + "." + fileextention
- path_file = os.path.join(filepath, filename)
- print("Your file will be in path ", filepath)
- print("nYour file will look like " + fn)
- r1 = int(input("Starting for range : "))
- r2 = int(input("Range till : "))
- for i in range(r1, r2):
- filehandle = open(path_file + str(i) + "." + fileextention, "a")
- filehandle.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement