May-11-2018, 02:12 PM
Dear Python Experts,
I wonder if it is possible to write a small python program
that goes through my 50 000 .json files on my windows machine and deletes every .json file that conains "throttle":"0" or "throttile":"0.0"
as well as an image that is in the same folder and named in the .json file "cam/image_array": "xxxxxxxxx.jpg"
I imagine looping through all .json files and if the pattern is found, extracting first the image name and deleting the image
and second deleting the json file, then go to next file.
Is something like that possible?
I wonder if it is possible to write a small python program
that goes through my 50 000 .json files on my windows machine and deletes every .json file that conains "throttle":"0" or "throttile":"0.0"
as well as an image that is in the same folder and named in the .json file "cam/image_array": "xxxxxxxxx.jpg"
I imagine looping through all .json files and if the pattern is found, extracting first the image name and deleting the image
and second deleting the json file, then go to next file.
Is something like that possible?