side_tools.py 424 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 24 11:14:11 2020

@author: veitlueschow
"""

# clean director for new run

import os
import sys

def clean():
    directory = "./"
    test = os.listdir( directory )
    print(test)

    for item in test:
        if item.endswith(".nc") or item.endswith('.h5'):
            os.remove( os.path.join( directory, item ) )
            print('deleted ', item)