1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Program to find corrupted files?

Discussion in 'All Other Software' started by Biffons, Jul 19, 2015.

Thread Status:
Not open for further replies.
Advertisement
  1. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    Is there a program (portable, freeware would be the best) which can find corrupted files (on external drives, hard disks) independently of the extension?

    When I copy / move files they sometimes become corrupted without error message / any sign, so I want to check now how many files are corrupted: http://forums.techguy.org/windows-7/1151880-copied-same-file-few-times.html
     
  2. DaveBurnett

    DaveBurnett Account Closed

    Joined:
    Nov 11, 2002
    Messages:
    12,970
    Nothing better than the original copy/move should.

    An anti-virus scanner will do it as a by product, as will any program that scans the files individually.

    You should seriously think of reviewing the way you copy things if this is a regular problem. The only way, that I know of, of getting corrupted files is to remove devices before the writing has finished - and Windows saying it has finished is NOT true. What that means is that Windows has finished writing to the BUFFER, but the buffer may not actually write to the device until it has no higher priority tasks. The only way to be sure is to use "SAFELY REMOVE" and wait until it says it is.
     
    Last edited: Jul 20, 2015
  3. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    Many thanks, Dave.

    Sorry, I am not quite sure to understand. But obviously that means transfer failures might not be displayed?

    I never had supposed that, I would have thought those programs find malware files only. How could I find files corrupt by moving / copying.

    Well, I noticed the problem / the corrupted files some days ago.

    It depends on the settings of Win, I would say. By default they should be like something like that should not happen. And I remove all of my drives with such a safely remove option. But anyway, I cannot imagine that there is a connection to my corrupted files. I copy a file, check the check sum of the copy, sometimes it is different, sometimes it is not. How could there be a connection to how to remove a drive?

    Many thanks again.
     
  4. DaveBurnett

    DaveBurnett Account Closed

    Joined:
    Nov 11, 2002
    Messages:
    12,970
    There is a feature of all reading writing of files called a Cyclic Redundancy Check or CRC. This is like a check digit and everything that reads a file should check the CRC and since this is the last part of a file written the writing software knows whether the write was successful as far as it is concerned (I'll expand in a minute).

    Any program that reads a file will also compute the CRC to check that it has read it correctly so an antivirus checker will also check the consistency of every file it reads as well as scanning it for viruses.

    When files are written by Windows, it usually writes them to a buffer and the buffer is written to the device. Windows did have problems with removable drives in that Windows thinks that the write is finished and will say so when it has written the last buffer,
    but that buffer is still likely to be in the process of written to the actual device. Obviously if you remove the device (having seen the message from Windows) before the buffers are fully written to the device, the data on the device will be corrupt. Using the safely remove forces the buffers to be cleared immediately and the reply is only given when that it complete.

    Corrupted files will also occur if the media itself is faulty.
     
  5. DaveA

    DaveA Trusted Advisor Spam Fighter

    Joined:
    Nov 16, 1999
    Messages:
    15,657
    First Name:
    David
    And if one uses the "Copy and Paste" vs "Select and Drag", one is bound to double the possible errors.
     
  6. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    So for each file which is copied / moved such a CRC is built automatically (and it does not take more time to compute such a CRC because it is done while the file is read. It is the same as a check sum, I suppose. But to check the written file (the copy) lasts some time as the file cannot be checked after it is written completely, I assume.

    But why / how does the antivir program know the right CRC (from the first scan?)? And how could I make a antivir program check files not because of a virus but because a corruption by transferring the file or by a hardware defect?

    But Windows does not show any messages after a successfully finished transfer, the copying, moving message just disappears, or am I wrong?

    I understand. So this means, when you compare to files by content / CRC / check sum while there still are data in the buffer not being written the check sum / CRC is wrong / dismatching?

    Yes, I know.

    So using the shortcuts STRG+C / V vs. use the mouse, using the mouse doubles the errors? Why is that?
     
  7. DaveBurnett

    DaveBurnett Account Closed

    Joined:
    Nov 11, 2002
    Messages:
    12,970
    The CRC is written at the end of the file and the calculated value is compared with that.

    That is correct

    No. this means that if you remove a device whilst files are still being written to it, data will be missing from the device - whatever data that is.
    Think of it as if someone snatched your wallet while you were putting money in it. Some of the money will be missing from the wallet.

    I'm not sure it does. Dave A wrote that and I am not sure what he was alluding to, though I may have missed something.
     
    Last edited: Jul 20, 2015
  8. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    Ah sorry, I understand. Each file contains the CRC. But when I check files by check sum the


    Hmmm, what do you mean by "Windows thinks that the write is finished and will say so". Say it with a message?

    Alright.

    I assume, he will tell us.

    Many thanks.
     
  9. DaveBurnett

    DaveBurnett Account Closed

    Joined:
    Nov 11, 2002
    Messages:
    12,970
    The file write progress bar will reach the end and disappear.
     
  10. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    Ah, I see, Win will say so by letting the copying / moving message disappear.

    Many thanks.
     
  11. DaveA

    DaveA Trusted Advisor Spam Fighter

    Joined:
    Nov 16, 1999
    Messages:
    15,657
    First Name:
    David
    When using Copy and Paste, the data is copied to the RAM and/or Swap space, then in turn it is store there until one does the paste. Early on when the "Select and Drag" was put out, the big push by Microsoft was that the speed and less error prone, the new act was over the Copy and Paste.

    At that time, way to many people used Cut and Paste and data was lost because of the CUT would be lost if another Cut was done. I seldom ever use CUT I always use Copy. I think too many people today use CUT way to much, because they lose their files and do not know why.
     
  12. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    I am not quite sure to understand correctly, but on my system when I use STRG+X and STRG+V the source file is deleted (to the bin, so it is recoverable) when I press STRG+V, not before. So actually there does not appear to be any risk. Or am I missing anything?
     
  13. DaveA

    DaveA Trusted Advisor Spam Fighter

    Joined:
    Nov 16, 1999
    Messages:
    15,657
    First Name:
    David
    If one does a "STRG+X" and then does anther "STRG+X" you will lose the first selection.
    People get disturbed when doing this and forget what they were doing and have thrown away too many files. Also, any clinch may snag the data from clipboard.
     
  14. Biffons

    Biffons Thread Starter

    Joined:
    Sep 12, 2014
    Messages:
    133
    Yes, but the first file is not being deleted, it is still there. Sorry, if I am not understand it correctly.

    Hmmm, which files are thrown away? Yes, when one copies just a single sign / character the entire content / file copied before is gone, if I understand it right.
     
  15. DaveA

    DaveA Trusted Advisor Spam Fighter

    Joined:
    Nov 16, 1999
    Messages:
    15,657
    First Name:
    David
    When one uses "CUT" it MOVED to the clipboard, so if the clipboard has a clinch, then the file will be deleted.

    Now you have introduce the editing of a file. The data that has been cut from the file can be lost, but the file it self will remain.
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1151936

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice