initial: existing TutorialDock Python app + conversion design and plan

This commit is contained in:
Your Name
2026-02-19 01:16:17 +02:00
commit 47d4409bcc
5 changed files with 7268 additions and 0 deletions

33
scripts/rename_folder.py Normal file
View File

@@ -0,0 +1,33 @@
import os
def rename_folder():
# Get the current working directory
current_dir = os.getcwd()
print(f"Current directory: {current_dir}")
# Prompt user for the current folder name and new folder name
current_name = input("Enter the current folder name to rename: ")
new_name = input("Enter the new folder name: ")
# Construct full paths
current_path = os.path.join(current_dir, current_name)
new_path = os.path.join(current_dir, new_name)
try:
# Rename the folder
os.rename(current_path, new_path)
print(f"Folder '{current_name}' renamed to '{new_name}' successfully.")
except FileNotFoundError:
print(f"Error: Folder '{current_name}' does not exist in {current_dir}.")
except PermissionError:
print(
"Error: Permission denied. Try running the script with administrator privileges."
)
except Exception as e:
print(f"An unexpected error occurred: {e}")
if __name__ == "__main__":
rename_folder()