Created
August 14, 2019 20:58
-
-
Save imanabu/b6f13f79d498dfd140f89f9ff2b3b1d0 to your computer and use it in GitHub Desktop.
Python Dir Exists and Scan Directory
This file contains 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 os | |
import os.path | |
from pathlib import Path | |
if not Path.exists(Path(image_source_dir)): | |
raise Exception(f"The source not found: {image_source_dir}. Please correct this in Migrate.py") | |
index = 0 | |
previousInfo: ImageInfo = None | |
for ent in Path(image_source_dir).iterdir(): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment