I have a text file as below.
4b64dac0d3b4592143368e6c2d676039165b6159 Detections: -1
0e00854b6b9e431ce1fe56b9bcebdb6b8f088012 Detections: 0
1c1fc6283eb75cc1fd2885a81d43843009ebba77 Detections: 14
2e19a1b2e451e799b2feaba39148cfd2740de8e2 Detections: 5
3a0761b29c55135122fcdb2ebb72519306ea4b35 Detections: 1
And Five files named as mentioned above in one location:
In that, i want to move file to specific folder based on detection Condition. The condition are: If detection is greater than Zero means, it move to folder name "found". If detection is lesser and equal to Zero means , it move to folder name "Not found".
Result would be:
In Found folder,
1c1fc6283eb75cc1fd2885a81d43843009ebba77
2e19a1b2e451e799b2feaba39148cfd2740de8e2
3a0761b29c55135122fcdb2ebb72519306ea4b35
These files will be moved
and In Not Found Folder,
4b64dac0d3b4592143368e6c2d676039165b6159
0e00854b6b9e431ce1fe56b9bcebdb6b8f088012
These files will be moved.
Can anyone could help me through done this?
i have tried like:
with open('D:\SHARE\Check\check.txt') as infile:
for line in infile:
if condition:
Detections: 0
next(infile)
I don't know how to check condition and move file based on that