Record#
- Today I learned about operating system functions.
- os.os.listdir() reads directories.
- os.mkdir("Hello") creates a directory.
- os.rename() renames files.
- os.popen(f"cp to.do backup/{bkname}") is a copy command. ChatGPT says this function is deprecated, and the latest one is subprocess.run(["cp", "to.do", f"backups/{name}"]).
- Today's exercise is to modify the code for day 51 and add a behavior to save to a specified directory with a random file name before automatic saving.