The filename or extension is too long. (206)

Any ideas on how to work around this error copying from an exFAT to an NTFS drive? Obviously the path is longer than 256 characters but I thought that Directory Opus could handle long paths. The program certainly copies more files than Windows explorer, but I really need ALL the files copied.

Do some of the files/folders have names (not paths, but names) which are longer than 256 chars?

Such names will break parts of the Win32 API. For example, the API for listing directories uses a 260 character buffer to return the name of each item. So even in code which handles very long paths correctly, if individual names/components within those paths go over the limit then things start to fail.

I would recommend narrowing down the problem to find out exactly which file/folder is causing it, so that it is possible to see/understand exactly what is going wrong.

[quote="leo"]Do some of the files/folders have names (not paths, but names) which are longer than 256 chars?
...
I would recommend narrowing down the problem to find out exactly which file/folder is causing it, so that it is possible to see/understand exactly what is going wrong.[/quote]

Filenames and folders are considerably shorter than 256 characters, although obviously the full path is longer. For example I think the first of seventy folders or so that won't copy is...

X:\Backup\20110131\Windows\Data\Personal\1234567\Old (Confidential and Attorney Client Privileged)\from backup dvd half)\xxx\To Be Stamped\1 - Before modification\Financial\American Express\Blue Account xxxx-xxxxxx-xxxxx\Correspondence and Agreements

It is hard to tell exactly since the Copying dialog shows "From: K:\Backup\20110131\Windows\Data\Perso...\American Express" and then "An error occured copying 'Correspondence and Agreements': The filesname or extension is too long (206). This could be any number of folders, but after aborting the copy the above appears to be the last folder copied. I think that path would be 250 characters.

I can provide an exact breakdown of how many total paths are longer than 256 characters, something like 70 files of 20,000, but again none of the filenames or foldernames are very long by themselves.

Thanks for the extra details. Using those we've re-created the problem and found that there is a situation Opus doesn't currently handle when dealing with very long paths. We'll get that fixed for the next update.

In the mean time, you should be able to work around the problem using a little trick.

In the destination window, go to the path field and add [b]\?[/b] to the start of it. For example, if you were copying the Backup dir into [b]D:[/b], edit the path field so that it says [b]\?\D:[/b] instead, then hit return.

You should then be able to do the copy without any problems.

(Having \?\ at the start of the path tells Windows to remove the path-length limitations. Opus normally adds \?\ by itself when needed, but doesn't realise it is needed in this specific case. Adding it by hand gives you the same result. Note that it may cause Opus to treat the destination as a network drive for some purposes, but that shouldn't cause any real problems.)