Created
May 30, 2019 07:58
-
-
Save Santara/317d51576799740954e3e85d65f1eede to your computer and use it in GitHub Desktop.
Gathering logs from separate experiments into one directory with proper naming of the logs
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 | |
from glob import glob | |
import shutil | |
root_dir = '.' | |
for dir in glob(root_dir+'/*'): | |
dir_name = dir.split('/')[-1] | |
if os.path.exists(os.path.join(dir, 'log1.csv')): | |
shutil.copy2(os.path.join(dir, 'log1.csv'), os.path.join(root_dir, 'logdump', dir_name+'.csv')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment