#!/usr/bin/env python3

#how to delete file:

#os.unlink --> this is to delete one file
#import os
"""
>>> os.getcwd()
'/Users/ymccarter'
>>> os.unlink('/Users/ymccarter/personalBackup/backupEc2.py')
>>>
the result:
us8c8590b49c4d:personalBackup ymccarter$ ls
ec2.py		oktacli.backup
us8c8590b49c4d:personalBackup ymccarter$

"""

#to delete folder
#os.rmdir() --> this works only when the directory is comp[etely empty:

"""
>>> os.rmdir('/Users/ymccarter/personalBackup2')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OSError: [Errno 66] Directory not empty: '/Users/ymccarter/personalBackup2'
"""

#in order to remove directory with files:

"""
>>> import shutil
>>> shutil.rmtree('/Users/ymccarter/personalBackup2')
>>> 
"""