0

Using WindowsXP-Pro, I'm trying to copy a largish file (~28 MB) on to an SD Card.

The copy gets almost completed, when it fails and returns with this error:

Cannot copy <filename> file: Invalid MS-DOS function

There's lots of room on the card 120+ MB. I can copy lots of other smaller files onto the card, so I don't think the media has failed.

Is there something else I've missed?

4
  • Interesting definition of "large file" ;-) Thought it's gonna be question about files >4GB
    – vartec
    May 14, 2009 at 19:16
  • try formatting the card.
    – Saif Khan
    May 14, 2009 at 19:33
  • Vartec, yes large is relative. I can remember pining for a 1GB drive when my Unix quota was only 10MB (and even then, I could do a lot with that).
    – BIBD
    May 14, 2009 at 20:15
  • @CodeSlave: I couldn't agree more. It is relative. And in relation to current SDHC capacities and speed, 28MB is rather small file.
    – vartec
    May 15, 2009 at 10:37

7 Answers 7

1

Try zipping up the file and then copy it. To see if the filesystem or card is somehow corrupt, backup your data, re-format the card, and try again.

By the way, can you copy that file elsewhere on your hard disk? Because if you can't, then the file is corrupt (or less likely, a part of the filesystem).

1

It's possible either the card or your hard disk have problems which the smaller files aren't finding. Have you run ScanDisk on them?

Right-Click | Properties | Tools | Error Checking

Also, is it possible the filename has reserved or otherwise unusual characters in it? Try renaming it to a.dat or something innocuous and see if that helps.

[Edit] OK, now you've tried that, there are a few other possibilities:

  • It's probably FAT16 and can only have 512 files in the root directory (less if you use longer than 8.3 filenames).
  • An obvious point, but can you copy this file somewhere else? e.g. a USB flash drive
  • The next step is to copy everything else off the SD card and try to copy the big file over again.
  • If that fails, reformat the card and start again.
2
  • No errors found. Renaming the file brought gave the same results.
    – BIBD
    May 14, 2009 at 18:00
  • Yup, FAT16. Although the file is being copied into an empty subdirectory. I can copy to other media, but I want it on this one - it works with my PDA (my preferred mp3 player - coincidently it's today's Podcast I want to be listening to on my way home tonight :) ).
    – BIBD
    May 14, 2009 at 19:11
1

In addition to the possible suggested file system problems, I've seen this when the SD card file system is compressed. Copying a file that is not compressible can cause the copy to fail, despite the reported free space being larger than the file being copied.

1
  • The card is not compressed. It's a 1GB card, and total space on the card shows as 1GB as well.
    – BIBD
    May 14, 2009 at 19:00
1

I'm all about narrowing the problem down.

Is the problem with the file? Find another file of the same size or larger & see if that copies. If you can copy the file after zipping it, that also points to a problem with your original file (as mentioned above).

Is the problem with the source computer/driver/port? Email/copy the file to another computer and attempt the copy.

3
  • I was able to make a copy of the original on the HD to the source HD. So there seems to be no problem with the source. Copying that copy to the SD Card also failed. Copying another similar sized file also failed (but I have larger ones already on the same card, so I don't think it is a limitation of the file system - FAT).
    – BIBD
    May 14, 2009 at 19:07
  • Ruled out the specific file, awesome. Have any alternative SD cards or drives you can try? May 14, 2009 at 20:15
  • Yup, I can dump it to a USB drive or the same SD card if I move a big file off of it.
    – BIBD
    May 14, 2009 at 21:45
1

Ok, I think I've got it sorted out.

I think the card was fragmented enough that windows wasn't able to copy file to it without breaking it up in to far to many pieces.

  1. Disk Defragmenter's analysis didn't show a "need" to defragment, but there were lots of little gaps, and not very many bigger gaps. I know defragging SD cards and USB drives is considered harmful, so...
  2. I moved another big file off, and then moved my original file on and that worked. But moving the first big file back on again didn't. So...
  3. I moved the contents of the whole card off onto the C drive, and then back on (effectively a defrag without all the writes that Disk Defragmenter would do). This allowed me to move all the files onto the SD card. I was even able to fill up the rest of the disk without that error occurring again.
5
  • 1
    That seems very weird - the FAT doesn't care how fragmented its filesystem gets, it's just an index to ever single allocation unit on the disk. Anybody know why?
    – MikeyB
    May 14, 2009 at 20:46
  • True... it shouldn't care. But how many times have you had a problem with a PC, where defragging the drive has solved it?
    – BIBD
    May 14, 2009 at 21:44
  • 1
    Interesting. I still wonder if there is a bad sector somewhere that scandisk didn't pick up, but you were just lucky enough to avoid when reorganising the location of the data. Anyway, glad you solved it!
    – Adam
    May 15, 2009 at 5:16
  • Yeah, sounds like a bad sector towards the end of the card, try to fill up that card and see if you get that error again :P
    – Andor
    May 28, 2009 at 14:31
  • I was able to fill the card right up without any further complaints.
    – BIBD
    May 28, 2009 at 17:18
0

format the card to NTFS and start again...

0

Formatting this on NTFS or FAT32 will not solve the problem if it is a hardware problem, both will fail, looks like a (hardware) damaged destination drive

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .