def movebatch(self, Form):
     items = []
     for index in xrange(self.listWidget.count()):
         items.append(self.listWidget.item(index))
     labels = [i.text() for i in items]
     
     i=0
     for filename in labels:
         move_tv_show.copysort(str(filename))
         i+=1
         self.progressBar.setValue(i)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Search for avi files and move them in the right folder
"""

import os
import move_tv_show

files = [f for f in os.listdir(".") if f.endswith('.avi')]

for filename in files:
    move_tv_show.copysort(filename)





 def move(self, Form):
     a=self.lineEdit.text()
     filename=os.path.relpath(str(a))
     move_tv_show.copysort(filename)