Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- username = "Username"
- admin_file_path = f"/disk/users/{username}/admin.txt"
- file_to_delete = "filename"
- if os.path.exists(admin_file_path):
- os.remove(file_to_delete)
- print(f"{file_to_delete} has been deleted.")
- else:
- print("Admin file does not exist. Cannot perform deletion.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement