Search this site
Hosted by A2
Webheads love A2 Hosting because they do PHP5, MySQL5, PostgreSQL 8, cPanel, Ruby on Rails, and SSH/Shell. I use them because I like dealing with responsive, friendly human beings. Plans from $2.95/month.
Archives
Subscribe (e-mail)



Powered by FeedBlitz



Think you’re a Windows expert? Here’s a stumper for you. See if you can guess the answer.

On my primary hard disk, I have a folder filled with 430 digital image files in JPEG format. Collectively, they occupy a little under 300MB of disk space.

I want to copy those files from one machine to another using a 1GB USB flash drive I have hanging around. The flash drive is formatted and completely empty.

I open Windows Explorer, select all the image files, and drag them onto the flash drive icon. Windows begins copying the files to the portable drive, but about a third of the way through, the copying process stops with a cryptic error message containing the code 0×80070052: “The directory or file cannot be created.”

What’s the problem, and how can I fix it?

First one to get the correct answer wins a signed copy of Windows XP Inside Out, Second Edition.

Update: We have a winner. See the comments for the discussion. Here’s a more detailed explanation:

The problem is that the flash drive, like many USB devices, was formatted using the FAT16 file system. Most Windows users haven’t had to deal with this disk format in years. FAT32 was introduced in 1996, and Windows XP has supported NTFS as the default file system since its introduction in 2001.

So what’s the problem? FAT16 volumes impose a strict limit of 512 entries in the root directory (you can have as many as you want in subfolders). A KB article, Errors Creating Files or Folders in the Root Directory, explains:

This problem occurs when all 512 root directory entries have been used. This problem can also occur with fewer than 512 files and folders in the root directory because Windows 95 uses additional directory entries to store long file names.

A table at the end of this article explains that long filenames typically use four directory entries, and my digital image files were definitely using long names. So at 4 directory entries per file and 512 entries total, I was running out of room to store filenames when I hit 128 files.

The solution was to create a subfolder on the flash drive and copy the files there instead. As soon as I did that, all was well. 

23 Responses to “A Windows brain-teaser”

  • Ervin J says:

    Thank you, Gerard and Carl!

    It could have been any of you, guys. A quality blog like this must have quality readers. ;)

  • Helen says:

    Thank you Ervin,

    Your solution worked for me too.

  • Luke O'Malley says:

    I was intrigued by the question because it is close to a problem I am having. Running XP SP2 with the HD on my laptop using NTFS file structure and my external USB HD using FAT 32, I have trouble copying certain files from the Laptop to the External HD. Here is the reason: some of the files are in foreign languages and use diacritical marks, for example, Jose or Jos and an e with an accent on it. When I have two files that differ only because of the diacritical marks, when I try to copy them I receive the msg “Cannot create or replace . The directory or file cannot be created. By removing the diacritical marks everything is OK. Unfortunately I have a folder with about 20,000 files in it that I want to copy.

    Does anyone know the solution to this problem?

    Goodwill,
    Luke

Sponsors
Contact me
Send me an e-mail using this contact form.