The filename you specified is invalid or too long

B

Bikini Browser

Hello everyone...

I'm trying to migrate files from a Windows SBS 2000 server to a Windows 2003
SBS R2 new server. The data drive is alone so I should be able to just copy
ALL the data from one drive to the other using Winwows Explorer. Both target
and destination drives are NTFS.

I am using the standard Windows Explorer, click-dragging folders from the
old data drive to the new 2003 Server's Hard Disk. Everything works as
expected except that every once in a while I get a message like "The
filename you specified is invalid or too long". and then the copying stops.

This usually happens in folders that are nested 3 to 5 levels "deep" ore
more in the folder tree.
Here is one example of a file name I found:

"Report on complience and internal control over financial reporting based on
an audit of financial statements performed in accordance with government
auditing standards.wpd"

I can't always shorten the file's name, because the users expect to find the
same file names on the new server. However when I change the file name for
some of the files they then copy OK.

This is very annoying since I have to "walk down the folder tree", find the
file, and rename (i.e., shorten the name) it, for every error. Since the
error also aborts further copying, I have to find these "landmines" one at a
time, or more specifically, one per copy session.

The "offending" finenames are typically 25 to 50 characters long, and
nowhere near the 255 character limit.

So here's my question:

Is there some parameter somewhere that need to set to avoid this error?

If the filenames are really too long, why did the system not complain about
them when I originally named the files on the System Hard Disk? (This is a
GOOD Question!)

Is the problem really one of too long a filename or an "invalid" name. If
the name was invalid, wouldn't the OS have complained when I originally
assigned the name to that file on the System Hard Disk. I've looked at the
"offending" filenames carefully, and none of the forbidden characters are
present. Also, there are no leading or trailing spaces in the "offending"
filenames.

Is there a Utility with Windows 2000 or Windows 2003 SBS Server that is
similar to SCANDISK on Win-9x OSes? If there was, I could use it to find
ALL offending filenames at once, instead of having to "walk the minefield".

Is there a better way to copy contents of a folder and all its subfolders
from the System Hard Disk to a Backup Drive, that would be less sensitive to
this "long file name error".

I look forward to you ideas....

Bikini Browser
 
J

JS

How about the total number of characters including the folder and subfolder
names as part of the total count.

JS
 
C

C A Upsdell

Bikini said:
Hello everyone...

I'm trying to migrate files from a Windows SBS 2000 server to a Windows 2003
SBS R2 new server. The data drive is alone so I should be able to just copy
ALL the data from one drive to the other using Winwows Explorer. Both target
and destination drives are NTFS.

I can't always shorten the file's name, because the users expect to find the
same file names on the new server. However when I change the file name for
some of the files they then copy OK.

The "offending" finenames are typically 25 to 50 characters long, and
nowhere near the 255 character limit.

AFAIK the limit applies to the full pathname, i.e. to the drivename plus
the directory names plus the filename. So reduce the sizes of the
directory names, if you can.
 
S

SuperGumby [SBS MVP]

the data should be restructured to remove such long paths. One way of
getting at the files is to create intermediary shares along the file path
and attach to them.

d:\really_long...folder_name\some_more\and_even_more\eventual_file.doc

turn \some_more\ into a share and attach to it, this shortens the apparent
folder\file name length and allows the files to be accessed.

I hit the problem some time ago where a client had
d:\some_long_pathing\nurses in Melbourne wishing to move to Sydney\Anna
Marrie Goddard\resume.doc and renamed the folders (once I could, you very
likely can't while the long paths exist) to d:\shorter_pathname\Nurses
Mel2Syd\GoddardAM and was thanked by the client for the ingenious naming
system, it meant that when document paths appeared they could actually be
seen (or at least, more of the content). Part of your responsibility as
administrator is to improve how things are done.
 
E

Eugene Tan

hi,

I've seen this happen on a couple of my customers.

If this is happening to files/folders which are only 3 to 5 levels nested,
that
means some enduser is including a lot of description or particulars on the
folder names and/or file names. If it's only 1 or 2 users, help them find
an
effective workaround, if it's across the board then you need to help them
figure an alternative solution.

One reason why it happens is that on the server, the path might be
D:\Company Share Folders\WorkArea\Current\Client\ProjectName\etc\etc\
but this is mapped on the PC as N:\Current\Client\ProjectName\etc\etc\
so the end users are able to save with this path but you run into trouble
when
trying to copy or migrate.

Even copying to D:\short\Current\Client\ProjectName\etc\etc\ fails because
the source path itself is too long. One way to workaround is to do the
copying
from a PC, mapping D:\short as a drive letter and then copying from N: to
this.
Downside is, copying over the LAN can take lots longer seeing that you're
a migration. You can test if only a few folders are affected, then only
copy
these via PC.

Ultimately though, you'll want to find another way that doesn't come so
close
to the 256 character limit. Figure out and train the users.

In my customers' case, they needed keep descriptions so it would show up
in searches as well as needed the reference number.
In one case, since I was doing an app in ACCESS, I used only the reference
number for the folder, and all other descriptions were put into fields. To
get to the folder, users did a search, then click on a button and the folder
would open.
In another case, since I wasn't doing any app, well they still need some
folder hierarchy but I helped keep the naming very short. The actual
folder description was put as a dummy filename which began with dash
and spaces.
Eg. "- detailed folder description such as project name" or
"@ detailed folder description such as project name".

HTH,
Eugene Tan
SBS MVP

===========================
 
N

NZSchoolTech

Your total path length allowed is 255 characters the filename and the folder
paths as well.
You can zip up the offending folder, copy the zip file to the new location
and unzip it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top