Find corrupted files and mass delete them.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Bruce
    PCHF Moderator
    • Oct 2017
    • 10697

    #16
    Originally posted by LoryKiller
    Didn’t I also need the checksum of the files before their corruption to check if it matches?
    not necessarily - CRC covers a lot a nerdy stuff.
    I don’t believe Windows does the CRC heavy lifting, it’s the disk driver when doing the transfer from the disk surface to the controller and it finds bad sectors that it can’t remap, or has multiple attempt at reading the data

    Comment

    • LoryKiller
      PCHF Member
      • Feb 2023
      • 16

      #17
      Originally posted by PeterOz
      The link would help
      Here’s the link : bash - How do I find corrupted archive files? - Unix & Linux Stack Exchange

      But the zip files aren’t a problem anymore:
      Originally posted by LoryKiller
      I managed, using my very limited python knowledge, to rewrite the script.
      Originally posted by Bruce
      did you try TeraCopy.
      I seem to recall it had a copy method that uses CRC checking, if so, that should detect corrupted files as the CRC value would highlight that.
      I tried it but it doesn’t find any problem.
      A script like the zip one would help but I don’t have any clue on how to let a python script open a photo or a video and check its integrity. If I come up with something I will let you know.

      Comment

      • PeterOz
        PCHF Technical Response Team
        • Mar 2021
        • 4190

        #18
        have a read of this Click On Me

        Comment

        • LoryKiller
          PCHF Member
          • Feb 2023
          • 16

          #19
          Originally posted by PeterOz
          have a read of this Click On Me
          Bad Peggy is exactly what I needed, thank you so much.
          I just need something similar for mp3 and mp4 files. I will do some researches tomorrow and keep you updated in case I’ll find anything.

          Comment

          • LoryKiller
            PCHF Member
            • Feb 2023
            • 16

            #20
            I’ve got some updates.
            I’ve found in this forum that you can use ffmpeg to check for the integrity of video files. I’ve made a simple python script and whenever ffmpeg returns with an error it moves the file into another folder, ready to be deleted (ofc after a quick manual double check).
            I won’t share it for the same reasons of the other one.
            And since I can use this script with mp3 files too I can finally say that this is resolved. Thank you all guys!

            Comment

            • Bruce
              PCHF Moderator
              • Oct 2017
              • 10697

              #21
              bit of mucking around, but you got there in the end, good find.
              will close as solved.

              Comment

              Working...