Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #/home/clockworkpc/bin/empty_folder.py
- # Released under a GPLv3 Licence by Clockwork PC 2013
- # www.clockworkpc.com.au
- # You are entitled to the following four freedoms:
- # Freedom 0: To run this program for any purpose
- # Freedom 1: To study how this program works and change it to make it do what you wish
- # Freedom 2: To redistribute copies so you can help your neighbour
- # Freedom 3: To distribute copies of your modified version to others
- import os
- # Change to the folder you wish to scan
- work_path = os.getenv("HOME") + "/Videos/tubemixing/NamedVideos/"
- for file in os.listdir(work_path):
- if not os.listdir(work_path+file):
- print "empty"
- os.rmdir(work_path+file)
- else:
- print "not empty"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement