Re: Filename too long when transferring computers

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Pegasus (MVP) wrote:
"HeyBub" <heybub@xxxxxxxxx> wrote in message
news:egr7M1Y%23IHA.1180@xxxxxxxxxxxxxxxxxxxxxxx
JMF wrote:
Here's something I can't figure out:

I bought a new laptop and am transferring files from the old one,
through a USB external drive.

For some of the files, the new machine says "The filename is too
long or filename isn't valid" so the transfer is aborted.

They're both XP machines (well, the old one is XP Home and the new
one is XP Pro).

If the name was fine on the old machine, why isn't it fine on the
new one? Especially since in these cases the names aren't even that
long. I'm guessing I have to set something on the new machine.

Anybody offer any insights?

You said "transfer" but didn't name the mechanism.

If you're using the command prompt COPY or XCOPY commands, be aware
that any imbedded spaces in folders or filenames bother the command
something fierce. To circumvent this problem, surround the source
and destination addresses with double-quotes, viz:

COPY "C:\Source Folder\Source File.TXT" "F:\Destination Folder\"

This is the second time today that you push this line. While you are
certainly correct in saying that file/folder names with embedded
spaces must be surrounded by double quotes, this has nothing at
all to do with the problem of having excessively long file+folder
names. Mentioning it to the OP will only cause confusion. Note
also that the double-quote requirement is not limited to the copy/
xcopy commands. It applies to ALL console commands, with one
tiny exception (which I won't mention for fear of adding to your
confusion).

I mentioned it because the OP said "... the filenames aren't even that
long..."

I deduced from that long filenames were not the actual problem.

As for generating confusion, that's simply not possible. If the OP does not
have any imbedded spaces in his his file\folder names, adding double-quotes
won't matter. If he does have imbedded spaces, adding double-quotes may very
well solve his problem.

I recall a situation from the days of the Yiddish theater. An actor
collapses on the stage. A doctor from the audience runs up and examines him.
From the balcony a Yiddishi-momma voice calls out: "Give him an enema!"

The doctor stands and shouts: "Madam, the actor is dead!"

The voice from the balcony shouts back, "So... It can't hurt!"


.



Relevant Pages

  • Re: Reintroducing fish, the friendly interactive shell
    ... globbing and is more suitable for matching filenames than the ... but Unix barely exists anyway. ... on any Unix, as long as you use zsh, as I specified:-b ... the same way most other unix commands do. ...
    (comp.unix.shell)
  • Re: need a little help with renaming files
    ... With vim, on the other hand, you're writing the actual filenames in mv ... commands, so you have to be *much more* careful. ... But if they do (and music files probably ... to visually miss wrongly escaped characters, ...
    (comp.unix.shell)
  • Re: For Loops and Space in Names
    ... Spaces don't belong in filenames and they make ... I'm going to include a script I wrote a long ... | One lesson I learned writing this was to use lot's of double quotes. ... Default is to recite commands and a -x option would make ...
    (Fedora)
  • Re: getting rid of filenames with whitespaces
    ... >> i'm using a Linux system running Samba as a filestore for a Windows client. ... >> whitespaces within the filenames. ... >> problem, but since some Unix commands cannot handle such files properly, ... >> a script to perform this task. ...
    (comp.os.linux.misc)