Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use xcopy to run a weekly backup of my files to a backup HDD. On the recent backup, it failed on a file with the following error message:

File creation error - The directory or file cannot be created.

Does anyone know what is the cause of this? How to fix it?

The filename which it fails on is:


The source [path + filename] is 117 characters long. The destination [path + filename] is 81 characters long.

The source disk is formatted to NTFS and the destination disk is FAT32.

share|improve this question

Apparently you aren't allowed square brackets in file names, so I don't know how they got there. You could try using fsutil to sort it out

share|improve this answer
I thought this at first too, then plugged in my FAT32 formatted usb stick to test. Square brackets are allowed, the wiki article doesn't make it very clear :\ – John T Aug 29 '09 at 6:30
Just out of curiosity does it copy with explorer, I'm just wondering if it's some weird xcopy issue. Also the suggestion about trying robocopy is a good one. – Col Aug 29 '09 at 10:47

Also, for a more robust copier than xcopy, you might want to consider changing to RoboCopy, part of the Windows Server 2003 Resource Kit Tools. It is a Robust Copy that can continue after issues like that and will provide you a neat report. It has a plethora of options that are worth putting some time into reading to ensure you get the most from it and your backups become something you don't have to worry about.

share|improve this answer
xcopy can do that already, too. – Joey Aug 29 '09 at 8:12

You must log in to answer this question.

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