Created
June 12, 2021 13:30
-
-
Save KaushikShresth07/740a32a1f04f3786dbc56c51e9851ebf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| from datetime import datetime | |
| def Notepad(Content,PathNow,PathToSave): | |
| time = datetime.now().strftime("%H:%M") | |
| filename = str(time).replace(":","-") + "-note.txt" | |
| with open(filename,"w") as file: | |
| file.write(Content) | |
| path_1 = str(PathNow) + str(filename) | |
| path_2 = str(PathToSave) + str(filename) | |
| os.rename(path_1,path_2) | |
| os.startfile(path_2) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment