Last active
July 1, 2020 18:58
-
-
Save walison17/a51d96e5c369bd7f7fb02929dcac4cef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shutil | |
from pathlib import Path | |
FILENAMES_TXT = Path("/home/walison/arquivos.txt") | |
SRC = Path("/home/walison/") | |
DEST = Path("/home/walison/arquivos-copiados/") | |
if not DEST.exists(): | |
DEST.mkdir(parents=True) | |
with FILENAMES_TXT.open("r") as filenames: | |
for filename in filenames: | |
shutil.copy(SRC / filename.strip("\n"), DEST) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment