Windows 7 Explorer may corrupt MP3 files – Tales from the Crypto

Windows 7 Explorer may corrupt MP3 files

I tried to find a less … alarmist tone to take in the title, but when I think of the consequences of this particular bug, I can’t see that I’m going over the top.

Quite simply, occasionally Windows 7 Explorer will corrupt files when you copy and/or move them using drag/drop. [So far, I’ve only seen this twice, and each time, I was moving MP3 files]

Last night, I dragged a group of files – over a thousand, totaling about 45GB of data, to move them to a network server.

This morning, one of the files was still on the original source. And on the destination.

That alone would be an unsettling bug, but not too much to worry about.

Out of sheer curiosity, I compared the two files (using “FC /B C:File1 Y:File1”).

Sure enough, although the beginning of the file was the same, starting at byte 0x480000 (there may be one too few, or one too many, zeroes there), the target file consisted of nothing other than nulls (zero byte, ‘’ if you’re a C developer).

This doesn’t only happen on files sent to the network, however.

Searching for files with large numbers of nulls at their end, I was shocked to find that over thirty of the files on my hard drive consisted of nothing but null characters. All these files were dated July 27 2009, so clearly that was a bad day for my computer.

That’s unsettling, because these particular files I had assumed to be safely moved. I had first copy-dragged them to my Podcasts folder, and then move-dragged them to a different folder, both of which actions were on my hard drive only. Having listened to these files out of my Zune (using the Podcasts trick I referred to earlier), I wiped them from the Podcasts folder, and now won’t be able to listen again, because the ‘backup’ copy is corrupted.


Mind you, they do compress well when there’s nothing in the file but nulls. 🙂

And, just in case anyone’s thinking my system itself is corrupt, or has a bad disk driver or something like that, I should note that I have completely wiped and reinstalled the system from scratch in the last few months, so the first (major) destruction of data was on a Windows 7 installation that was upgraded from Vista, and which had a number of the laptop manufacturer’s drivers on it; the second (less huge) destruction was on a fresh Windows 7 installation with almost no manufacturer’s drivers loaded.

I have yet to find any details of others experiencing this same problem. If you want to scan your own files (MP3 or otherwise) for vast quantities of null bytes at the end, I’ve uploaded the program here – it’s written in C#, and I’ve provided the source code as FindNulls.cs, and the executable as FindNulls.exe in the zip file. I won’t claim it’s a sample, or that it’s particularly good, but it will find files that end with several nulls in sequence.

23 Responses to Windows 7 Explorer may corrupt MP3 files

  • I’ve had a problem like that with a dodgy network card / driver.

    Like Windows assumes corruption is checked for in hardware and sometimes it isn’t. Try unzipping a big file over the network and see if you get any CRC errors.

  • FindNulls.exe seems to require .Net version FOUR, which I didn’t even know was available! I’ve installed 3.5 and all the service from Microsoft update, and get the following message box:

    To run this application, you first must install one of the following versions of the .NET Framework:


    Contact your application publisher for instructions about obtaining the appropriate version of the .NET Framework.

  • I do this all the time (copying mp3 files to my server from my windows 7 laptop) and have never encountered this problem. I’d suggest doing a bit more digging before blaming the OS or it’s components?

  • OK, Si, let’s take that suggestion on board and see where it takes us.
    If the problem lies outside of the OS or its components, there are two other basic possibilities. User error or bad hardware / device drivers.
    User error: What operation could I have mistakenly performed that would create the files under their correct names, but either partially or completely filled with nulls? I can’t think of anything that would do that. I welcome your suggestions.
    Hardware / driver: This behaviour has only ever happened when using Windows Explorer, and only to MP3 files. Hardware and drivers aren’t going to behave differently on MP3 files from other files, so that would seem to rule them out.
    Those are rather broad axe strokes, and I have finer cuts if you want them – but I have indeed considered the possibility that I did something wrong (note that I waited for it to happen a second time), or that my system might have faults outside of Windows. So far the preponderence of evidence points to the cause of corruption being that I either copied and pasted, or cut and pasted, these files through Windows Explorer.
    I’ll let you know when I have a test case that demonstrates the behaviour in an obvious and undeniable fashion.

  • JMThomas: I’ve uploaded a re-compiled version of the program, which should work in .NET 3.5. I’m afraid I’ve been playing with a beta version of Visual Studio 2010.
    Please let me know if the updated link works for you.

  • Just want to say I’m having similar issues. Unfortunately, your findnulls program doesn’t seem to find my mp3s that are corrupted. Like doesn’t even analyze those files. seems to happen at random to some files during large directory transfers (just upgraded (downgraded?) from ubuntu to windows 7)

    Maybe there’s some other corruption?

    If my tool isn’t finding those corrupted files of yours, the only thing I can think (other than the obvious, that I screwed up somehow) is that your corruption is different from mine. Can you compare a good file with a bad one to see what corruption has been wrought? In my case, it was fairly obvious that the end of the file – in many cases, the entire file – was replaced with null bytes.

    Sunday, April 3, 2010 04:48 PM by Alun Jones
  • I recently had my XP-SP2 system die out, and saved the HD. I attached it as an external drive to a new Windows 7 Professional-64 bit installation and copied the files over with Windows Explorer.

    500+ of my mp3 files are no longer functioning. The metadata is not being read, and the track length always shows as 0:00. The file size seems normal or close to normal. The odd thing is that none of the files seem to be older than November, 2009. This includes both files purchased online, and files downloaded via P2P. Any ideas what happened? Why not any of the older files, too?

  • wait… so not sure but I feel like I have this problem and it screwed up a lot of my music as well where there’s scratches and all that jibber jabber at random moments of an audio file?

    I’ve been thinking it was my hard drive but I did notice it right when I installed Windows 7… fml. I’ve been researching and testing for hours upon hours, I don’t even know what day it is.

    P.S. it’s my external hard drive.

    Probably not the same problem.

    The behaviour I’m seeing is that at some apparently random spot in the file (and for some files, that random spot is the first byte), and at every byte after that, the file contains only zeroes.

    This would mean that the file basically either refuses to play at all, or contains nothing. I don’t think it would cause a brief interruption and resumption like you’re describing. That sounds simply like there’s random spikes of incorrect data in your MP3 stream.

    Although it doubles the amount of time it takes to do anything, you can either use “FC” to compare the files before and after copying, or use COPY /V to verify the file after copying.

    I find external drives to be extraordinarily unreliable. We’ve lost data on three of the four external drives we’ve ever used. I now use external drive chassis only as a means of fetching data from an old internal drive without having to physically mount it internally.

    Sunday, July 18, 2010 08:52 PM by Alun Jones
  • Hi, I think I might have run in to the same problem. I was listening to music via Windows Media Player, went to another room to get my phone and when I came back it refused to play any MP3 file. I tried running some MP3’s with VLC which worked, but there were no audio at all.

    It could be something else though, the “symptoms” are the same but I wasn’t moving the files, just listening to music.

    By the way, how did you compare the two files, in case I’d want to do it myself?

    And the nullfinder thing didn’t work for me, not sure if I did something wrong or not.

    Reply appreciated.

  • i also lost hundreds of mp3’s in a similar way. I moved them around from Windows Hdd to external Hdd with Windows Explorer on Windows 7 Home Premium x64. Most mp3s moved correctly, others moved, but they are aomehow corrupted. The file size says correctly that it’s 4-5MB, but the duration is 0:00. And the MP3 ID3 tags are gone, they don’t show up when viewed by details in Explorer. When you put them in a Winamp playlist, and you use ctrl+alt+E to “read extended info” on the playlist files it also shows duration 0:00. this made me stop using Explorer to do my big GB’s copy or move jobs. I use teraCopy, it integrates into the shell so that you can right click a folder and copy/move securely, bc it has options for crc checking and testing the files after it has been copied. it also doesnt stop the whole copy process when 1 file has an error.

  • so. can the mp3 files be made usable again?

  • Yup, I just found out same thing happened to me… Transferred files using Explorer from my Dell Vista laptop to Iomega external HD and then to a new ThinkPad with Windows 7 x64. A handful of files (still not sure how many) were evidently corrupted in the move.

  • Goddamnit, I’ve just discovered some too. Checked in a hex editor, all zeroed. Some of them I’m not sure I can ever get back :/

  • Yep, I had fairly extensive corruption of mp3 files with Win 7 install as well. This isn’t a codec problem or hard drive failure. I didn’t have the null problem, but I did have the same exact problem of another poster, which is a common problem with win 7….during playback some songs will have jibberish and often segments from other songs will play. Luckily I have multiple copies and burned DVD-Rs with backups of all my songs. So I deleted all the mp3s from my Windows 7 system, and then used microsofts SyncToy to copy them back, with the check file contents option selected. So far I have had no problems when using SyncToy in this manner to copy my mp3s. Shame on Microsoft for not warning us of such a ridiculous problem prior to installation of Windows 7. Backup all data prior to installing Windows 7, not just your music……I have it up and running now but Win 7 was positively ridiculous to setup and would have resulted in massive data loss had I not been so meticulous about backups beforehand. Windows 7 also has a major known flaw of corrupting hard drives from previous operating systems like Windows 2000, for example – when trying to use the old Win2k drive as a 2nd drive in the new system for data storage.

  • I should add to my above comment, that I duplicated the scenario of corruption of good working mp3 files by copying them back to my Windows 7 system using Windows explorer.

  • Same issue here – with the garbled mp3 situation (random bits of other songs, usually located “nearby” on the file hierarchy, but always from another folder, being inserted into otherwise fine mp3’s). I had recently undertaken a big tag cleanup, and thought that perhaps that, or the fact I had the songs stored on an external drive, may be causing the error…but I can’t duplicate, and other data on the hard drive seems fine.

    I wonder if anyone here has tried to find *what* mp3’s are corrupted out of possibly thousands without listening to every one, when the problem isn’t zeroing out, but insertion of random data?

  • I realize this is an old thread, but this has been driving me crazy for months. An Mp3 might have 1 second from another track. The size of the copied file is exactly the same. Just a bit of bad data.

  • I Have Just Had a Similar Problem. I tune amps and install radios, speakers, subs, etc. I save my testing tones on my laptop. Today I found out that Windows corrupted ALL of my test tones! X.XX MB files all turned into 4.05 KB files and are now ruined. Now I have to re-purchase All of my test tones! I’ve tried to recover them. The quality has been destroyed and is unusable for tuning purposes. Now I have to put my work on hold while I wait for new tuning cd’s to arrive.

  • Crazy that Windows can’t handle basic file operations safely! The problem also appears to occur in Server 2008. Thank you SO much for taking the time to write a utility to find the corrupted files. At least I know which files I need to recover from (very old) backups.

  • Thanks for the utility ! I will now check my older backups with thousends of large files.
    Indeed I noticed the file corruption issue on my Windows 7 x64 system about 4 months ago.
    I observed corruption regularly only on large files, exceeding 1GB, and only copying to an external usb drive. Then I installed TeraCopy for avoiding the corruption during copy. Later I switched to Windows 8 where the problem seems to be solved. Recently I came back to Windows 7, that I kept on my machine in dual boot with Win8. My Windows 7 now has the lastest updates from Nov 2013, and I notice that currently all my copy operations of large files are correct (without TeraCopy). Maybe Microsoft pushed a correction in one of their updates ? Who knows.

  • Copied my music from 1 drive to another. Noticed Media Monkey was getting all sorts of read errors for a large number of files. Just could not get those files with errors to play. When I tried to delete them, I got the prompt that I need admin action to do that. I inspected further and see that they’re marked “read only” for some reason.

  • Also corrupts WAV files. I have been ripping a large number of CDs to my computer (so far 130Gb and a long way to go).

    All looked good and when I signed on the next day, a number of song titles had been moved to the Unknown Artist file within Music. This was done on a track basis and apparently random.

    Checking a couple of the tracks, they were removed from their proper folder and put into the Unknown Artist folder.

    Lots of work to verify what is good and what is not good.

    Not at all happy.

  • I discovered exactly the same problem (files contents overwritten by null bytes, file size and date OK) on a couple of different magnetic hard drives formatted in NTFS, in various Windows-based PCs (not always Win7, though). Not only mp3s were affected, mostly JPEGs and one large PDF. I think that in my cases the corruption was related to copying a large number of files at a time. What makes me wonder is that there is very little information on the net about this bug, thus, your posting is very much appreciated. Thanks for the utility, too. Works for me. Cheers!

Leave a Reply to burb boy Cancel reply

Your email address will not be published. Required fields are marked *