Skip to content

Instantly share code, notes, and snippets.

@brianspiering
Last active October 23, 2020 17:49
Show Gist options
  • Save brianspiering/cff181787b15ca610797a97eda7a02cc to your computer and use it in GitHub Desktop.
Save brianspiering/cff181787b15ca610797a97eda7a02cc to your computer and use it in GitHub Desktop.
Make folders based items in a file.
"Make folders based items in a file."
from pathlib import Path
names = Path("names.txt").read_text().split("\n")
for name in names:
p = Path("/output/") / name
p.mkdir(exist_ok=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment