Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | None | 0 0
  1. #!/usr/bin/python
  2. import os
  3. dirlist = os.listdir()
  4. os.system('mkdir -p ~/Desktop/MOVER/del ~/Desktop/MOVER/copied')
  5. count = 1
  6. for i in dirlist:
  7.     os.system('clear')
  8.     print("Processing {} - {}".format(count,len(dirlist)))
  9.     count += 1
  10.     i = i.replace("\'","\'\\\'\'")
  11.     print("1:Quit, 8:Keep, 9:Delete")
  12.     action1 = '--action1 \'echo \"q\" > ~/Desktop/mover_help.txt; pgrep feh | xargs kill -9\''
  13.     action8 = '--action8 \'echo \"c\" > ~/Desktop/mover_help.txt; pgrep feh | xargs kill -9\''
  14.     action9 = '--action9 \'echo \"d\" > ~/Desktop/mover_help.txt; pgrep feh | xargs kill -9\''
  15.     os.popen('feh -. {} {} {} \'{}\''.format(action1,action8,action9,i)).read()
  16.     uinp = ''
  17.     with open('/home/atta/Desktop/mover_help.txt','r') as f:
  18.         uinp = f.readlines()
  19.         uinp = uinp[0][:-1]
  20.         if uinp == 'c':
  21.             os.system('cp {} {}'.format(i,'~/Desktop/MOVER/copied/'))
  22.         elif uinp == 'd':
  23.             os.system('cp {} {}'.format(i,'~/Desktop/MOVER/del/'))
  24.     if uinp == 'q': break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement