Logo Search packages:      
Sourcecode: alarm-clock version File versions

OldDirCheck.py

import os, os.path, shutil

def OldDirCheck():
      if not os.path.exists(os.getenv("HOME") + '/.config/Alarm-Clock'):
            return
      else:
            try:
                  os.mkdir(os.getenv("HOME") + '/.config/alarm-clock')
            except:
                  pass
            
            for name in os.listdir(os.getenv("HOME") + '/.config/Alarm-Clock'):
                  shutil.copyfile(os.getenv("HOME") + '/.config/Alarm-Clock/' + name,
                                          os.getenv("HOME") + '/.config/alarm-clock/' + name)

                  os.remove(os.getenv("HOME") + '/.config/Alarm-Clock/' + name)

            os.rmdir(os.getenv("HOME") + '/.config/Alarm-Clock')

Generated by  Doxygen 1.6.0   Back to index