'test .zip/.7z/.rar if archive is bad, add prefix to file name bad_ and move to another folder

I have quite a few archives that I need to test.

Archives are in parent folders with many sub folders.

I am a Windows 10/11 user.

I have used 7z file manager easy enough, checks a folder for me and reports all good except for xx failed.

Then I have to manually hunt for the failed archive and move it somewhere to look at it at a later date for repair if possible or deletion.

What I would like to know if possible to do the following.

  1. Test the archives .zip/.7z/.rar
  2. If archive is bad, add prefix to file name bad_
  3. Move bad_ archive to another folder.

Then I can make plans for the moved files repair or delete.

cheers.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source