Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import os
- import time
- import shutil
- import sys
- def main():
- source_filename = sys.argv[1]
- destination_filename = sys.argv[2]
- while True:
- print time.time()
- time.sleep(0.05)
- if os.path.isdir(source_filename):
- os.stat(source_filename)
- else:
- continue
- print "moving", source_filename, '->', destination_filename
- os.rename(source_filename, destination_filename)
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement