Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save farisachugthai/c0b053fe510fc43018743aaf5081bdd0 to your computer and use it in GitHub Desktop.
Save farisachugthai/c0b053fe510fc43018743aaf5081bdd0 to your computer and use it in GitHub Desktop.
Change rst.txt to rst files --- Python Standard Library Documentation
#!/usr/bin/env python3
# Seemingly the easiest way to so, and I'll admit I felt clever for coming up with this off the top of my head.
import shutil, pathlib
for i in Path.cwd().iterdir():
shutil.move(i, i.stem)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment