how to remove only content of directory in python cmd shell code example Example: python dlete folder import shutil shutil.rmtree('/folder_name')