Created
May 28, 2021 19:12
-
-
Save mohit242/4e05f39710e9803d1e659b7381445fed to your computer and use it in GitHub Desktop.
Small script to copy over plots to destination drive from staging drive
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 glob | |
import os | |
import shutil | |
import time | |
while True: | |
for file_path in glob.glob("/mnt/staging/*.plot"): | |
try: | |
shutil.move(file_path, "/mnt/destination") | |
print("Moving plot ->" + file_path) | |
except Exception as e: | |
print("Could not move file " + file_path) | |
print(e) | |
time.sleep(60) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment