Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import os
- dirlist = os.listdir()
- os.system('mkdir -p ~/Desktop/MOVER/del ~/Desktop/MOVER/copied')
- count = 1
- for i in dirlist:
- os.system('clear')
- print("Processing {} - {}".format(count,len(dirlist)))
- count += 1
- i = i.replace("\'","\'\\\'\'")
- print("1:Quit, 8:Keep, 9:Delete")
- action1 = '--action1 \'echo \"q\" > ~/Desktop/mover_help.txt; pgrep feh | xargs kill -9\''
- action8 = '--action8 \'echo \"c\" > ~/Desktop/mover_help.txt; pgrep feh | xargs kill -9\''
- action9 = '--action9 \'echo \"d\" > ~/Desktop/mover_help.txt; pgrep feh | xargs kill -9\''
- os.popen('feh -. {} {} {} \'{}\''.format(action1,action8,action9,i)).read()
- uinp = ''
- with open('/home/atta/Desktop/mover_help.txt','r') as f:
- uinp = f.readlines()
- uinp = uinp[0][:-1]
- if uinp == 'c':
- os.system('cp {} {}'.format(i,'~/Desktop/MOVER/copied/'))
- elif uinp == 'd':
- os.system('cp {} {}'.format(i,'~/Desktop/MOVER/del/'))
- if uinp == 'q': break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement