2022年9月30日 星期五

Rename a file using Python pathlib module

Rename a file using Python pathlib module

 from pathlib import Path


path = Path("target file")


target = path.with_name(path.name.replace("08",'09'))


path.rename(target)

沒有留言:

張貼留言

Python program to display calendar

# Python program to display calendar of given month of the year # importing calendar module for calendar operations import calendar # set t...