# Challenge 79 - What If the File Is Missing?
from pathlib import Path

name = input("File to read: ").strip()
try:
    text = Path(name).read_text(encoding="utf-8")
except FileNotFoundError:
    print(f"File not found: {name}")
except IsADirectoryError:
    print("Please choose a file, not a folder.")
else:
    print(f"Characters: {len(text)}")
