File Name Too Long

Started by Holden, November 30, 2010, 12:04:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Holden

I'm in the process of putting all my CDs onto an external HDD (well, two actually).

The ripping process is not an issue but I am also backing up everything I've copied onto another HDD and this is where file names issue comes into play.

The CDs copy fine with the original file name but when I drag and drop from my main HDD onto the backup  HDD, at some point the process stops because a file name is too long and I then have to copy everything else file by file and where necessary shorten file names. It's a major PITA!

I'm running WIN XP Pro

So how do I avoid:

The rejection of long file names

or

The system stopping when a long file name appears.

I seem to remember that there is a way of getting around this in DOS.
Cheers

Holden

Opus106

#1
If you want to copy files via the command line, this should do it:

copy \path\to\source\file \path\to\destination

According to MS, the longest file name can be no longer than 259 characters.


EDIT: Correct link -- http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath
Regards,
Navneeth

Brian

Somehow I got Windows to copy everything except the too-long file names (one of which was Bernstein conducting "On the Waterfront" I think), and then leave those behind to fix. I can't at all remember how this worked, though, except I only used Windows 7 explorer.

DavidW

#3
Holden, the music tagging services are filled with IDIOTS! They think it's okay to make obscenely long file names. >:D  Here is my work around.

Mp3tag, download it here-- http://www.mp3tag.de/en/

Select directory=root of your music directory.  Select all (ctrl+a)

Then go to convert-> tag->filename, but then edit how you you want it to do it (and yes there is a composer field if you want it) to make it short, sweet but readable to you.  You can even do album-track#.  I mean who cares since the title appears in the tag anyway?  But anyway I find that usually dropping the composer, artist and album is sufficient since the title usually includes all of that, redundant.  That is just go with title, or perhaps track and title to force an organization by track #.

Do it!  And you're done, copy to your hearts delight and if you converted the filenames that shortens the name you won't be bothered again. :)

Notice that involved like only 3 steps (1. download and install mp3tag, 2. choose your directory, 3. convert filenames from tags) :D easy peesy. :)

Scarpia

Quote from: Opus106 on November 30, 2010, 12:16:25 AM
If you want to copy files via the command line, this should do it:

copy \path\to\source\file \path\to\destination

According to MS, the longest file name can be no longer than 259 characters.

Another problem is inconsistent rules for what characters are allowed in file names.  This can pop up when burning files to a data CD or DVD, which has its own rules for filenames which seem to be enforces more or less strictly, depending on what software you are using.  Sometimes the names get arbitrarily converted to those 8+3 DOS names, sometimes it just refuses to proceed.   >:(

Opus106

Quote from: DavidW on November 30, 2010, 06:38:02 AM
Holden, the music tagging services are filled with IDIOTS! They think it's okay to make obscenely long file names. >:D  Here is my work around.

Mp3tag, download it here-- http://www.mp3tag.de/en/

Select directory=root of your music directory.  Select all (ctrl+a)

Then go to convert-> tag->filename, but then edit how you you want it to do it (and yes there is a composer field if you want it) to make it short, sweet but readable to you.  You can even do album-track#.  I mean who cares since the title appears in the tag anyway?  But anyway I find that usually dropping the composer, artist and album is sufficient since the title usually includes all of that, redundant.  That is just go with title, or perhaps track and title to force an organization by track #.

Do it!  And you're done, copy to your hearts delight and if you converted the filenames that shortens the name you won't be bothered again. :)

Notice that involved like only 3 steps (1. download and install mp3tag, 2. choose your directory, 3. convert filenames from tags) :D easy peesy. :)

MP3Tag is a time saver. While I use the media player's tag editor for the usual stuff -- artist, album cover etc., its support for regular expressions makes tagging a ton of files with similar titles (which you can't usually do in bunches), as you say, easy peesy. :)
Regards,
Navneeth

DavidW

Quote from: Opus106 on November 30, 2010, 06:51:57 AM
MP3Tag is a time saver. While I use the media player's tag editor for the usual stuff -- artist, album cover etc., its support for regular expressions makes tagging a ton of files with similar titles (which you can't usually do in bunches), as you say, easy peesy. :)

Yeah Gurn told me about it, it's so fast. :)

I rip with itunes to alac, and fix any obvious tagging issues (like cover art) (I admit it, I prefer ripping with itunes because it doesn't take nearly as long to get started)
transcode to flac to mp3 with dbpoweramp
clean up tags, file names etc with mp3tag

8)
Boom! :)  I'm still glad to be done with all of that ripping though. ;D

Holden

#7
Quote from: DavidW on November 30, 2010, 06:38:02 AM
Holden, the music tagging services are filled with IDIOTS! They think it's okay to make obscenely long file names. >:D  Here is my work around.

Mp3tag, download it here-- http://www.mp3tag.de/en/

Select directory=root of your music directory.  Select all (ctrl+a)

Then go to convert-> tag->filename, but then edit how you you want it to do it (and yes there is a composer field if you want it) to make it short, sweet but readable to you.  You can even do album-track#.  I mean who cares since the title appears in the tag anyway?  But anyway I find that usually dropping the composer, artist and album is sufficient since the title usually includes all of that, redundant.  That is just go with title, or perhaps track and title to force an organization by track #.

Do it!  And you're done, copy to your hearts delight and if you converted the filenames that shortens the name you won't be bothered again. :)

Notice that involved like only 3 steps (1. download and install mp3tag, 2. choose your directory, 3. convert filenames from tags) :D easy peesy. :)

Thank you, I will download this when I get home and give it a try then come back to you for further advice.

The IDIOTS are possibly not the music tagging services but the people who submit information to cddb services such as Grace Note as this is where my problems seems to stem from - the names provided via Grace Note or Freedb (or am I wrong about this?)

Anyway I think I am about a quarter of the way from transferring all my CDs (over a 1000 of them). So far I've transferred all my piano CDs that are piano based and plus other big piano ouevres such as Chopin, LvB sonatas, etc. I am filing them electronically the way I've filed the CDs. I've also transferred all of my Bach and LvB which constitutes a major part of my collection. So far this amounts to about 70Gbs of MP3 in 256kbs or better. I'd go for FLAC except my MP3 player does not support this.

Once again thanks.

Thanks also to Scarpia for your advice but I'm not sure I have the confidence to proceed this way yet. You said that the largest number of characters that MS accepts for a file name is 259. I am pretty sure that none of the file names I've got are anywhere near that long so there must be a much  smaller limitation set in XP on both my PC and work laptop. (258 characters in red - that's a hell of a long file name.)Would that be right? If so, then how do I expand it out to 259? I am sure that would fix all problems if this were the case.
Cheers

Holden

DavidW

Well keep up the good work Holden.  I feel inspired now to listen to something in my collection... :)

Scarpia

Quote from: Holden on November 30, 2010, 11:39:44 AM
Thank you, I will download this when I get home and give it a try then come back to you for further advice.

The IDIOTS are possibly not the music tagging services but the people who submit information to cddb services such as Grace Note as this is where my problems seems to stem from - the names provided via Grace Note or Freedb (or am I wrong about this?)

Anyway I think I am about a quarter of the way from transferring all my CDs (over a 1000 of them). So far I've transferred all my piano CDs that are piano based and plus other big piano ouevres such as Chopin, LvB sonatas, etc. I am filing them electronically the way I've filed the CDs. I've also transferred all of my Bach and LvB which constitutes a major part of my collection. So far this amounts to about 70Gbs of MP3 in 256kbs or better. I'd go for FLAC except my MP3 player does not support this.

Once again thanks.

Thanks also to Scarpia for your advice but I'm not sure I have the confidence to proceed this way yet. You said that the largest number of characters that MS accepts for a file name is 259. I am pretty sure that none of the file names I've got are anywhere near that long so there must be a much  smaller limitation set in XP on both my PC and work laptop. (258 characters in red - that's a hell of a long file name.)Would that be right? If so, then how do I expand it out to 259? I am sure that would fix all problems if this were the case.

Actually I did not bring up the character limitation.  I suggested that the problem might be "special characters" appearing in the file name.  File names have to be unicode characters and some special characters like slash, colon, question mark, quote are considered invalid in a file name, depending on the operating system of file system formation you are using.  You might have file names with characters that are verboten on the device you are trying to copy too.

petrarch

Quote from: Holden on November 30, 2010, 11:39:44 AM
Thanks also to Scarpia for your advice but I'm not sure I have the confidence to proceed this way yet. You said that the largest number of characters that MS accepts for a file name is 259. I am pretty sure that none of the file names I've got are anywhere near that long so there must be a much  smaller limitation set in XP on both my PC and work laptop. (258 characters in red - that's a hell of a long file name.)Would that be right? If so, then how do I expand it out to 259? I am sure that would fix all problems if this were the case.

Just to be clear, it is worth noting that the number of characters includes the full path to the file, starting with the drive letter and going all the way to the extension. So, in XP, you can be sure you will be eating up a fair number of characters just by doing "C:\Documents and Settings\<user name>\My Documents\..." if you use the default paths.
//p
The music collection.
The hi-fi system: Esoteric X-03SE -> Pathos Logos -> Analysis Audio Amphitryon.
A view of the whole

Holden

Thanks to both of you, that certainly clears a number of things up as I go down this learning curve.
Cheers

Holden

Scarpia

Quote from: petrArch on November 30, 2010, 03:52:34 PM
Just to be clear, it is worth noting that the number of characters includes the full path to the file, starting with the drive letter and going all the way to the extension. So, in XP, you can be sure you will be eating up a fair number of characters just by doing "C:\Documents and Settings\<user name>\My Documents\..." if you use the default paths.

I don't think that is true.  If your path is "C:\Documents and Settings\filename.dat" that means there is a directory folder "C:\Documents and Settings\." which contains a reference to "filename.dat".  The preliminary part of the path is not part of the filename, it tells specifies the folder in which the filename is listed.  The character limit applies only to "filename.dat", not to the rest of the path.

Opus106

#13
Quote from: Scarpia on November 30, 2010, 06:11:58 PM
I don't think that is true.  If your path is "C:\Documents and Settings\filename.dat" that means there is a directory folder "C:\Documents and Settings\." which contains a reference to "filename.dat".  The preliminary part of the path is not part of the filename, it tells specifies the folder in which the filename is listed.  The character limit applies only to "filename.dat", not to the rest of the path.

The default limit of 259 applies to the absolute path, i.e., starting from the drive letter. (I accidentally linked to a page detailing the conventions used in 2000, but it doesn't differ from XP.) Technically, the limit is actually 260 characters, No. 260 being a null string terminator.
Regards,
Navneeth

Holden

I've downloaded MP3tag and had a good look and it does seem easy peasy. Would the best bet be to configure it as track/title or just use title? I do worry about track order being lost.

Cheers

Holden

DavidW

Quote from: Holden on December 01, 2010, 12:01:56 AM
I've downloaded MP3tag and had a good look and it does seem easy peasy. Would the best bet be to configure it as track/title or just use title? I do worry about track order being lost.

In windows you can customize music folders to display track #s (windows reads the tags), just like a media player would, and then you can sort that way (just right click -> sort by in Windows 7). So I guess what I'm saying is that you don't need the track # to sort, but if it's easier on you, it will only cost two characters.  Now that I think of it more, it might be a bad idea because those 2 cds for a single work like the Gothic Symphony or Mahler's 3rd will have more than track 1s, so you don't want to sort that way.

Alright enough babbling, I'm trying to say title only should be good enough. :)

Scarpia

#16
Quote from: Opus106 on November 30, 2010, 09:49:44 PM
The default limit of 259 applies to the absolute path, i.e., starting from the drive letter. (I accidentally linked to a page detailing the conventions used in 2000, but it doesn't differ from XP.) Technically, the limit is actually 260 characters, No. 260 being a null string terminator.

You are wrong.  The microsoft document you quoted says that Windows Explorer will not be able to access a file as a network share if the total path is longer than 259 characters.  There is a restriction on the length of string explorer can use to specify a network share.  That does not mean that the file can't be created or accessed locally with a longer path.  For creation of the file on NTFS the limit is 255 unicode characters in the filename itself (independent of the path to the filename).

Opus106

Quote from: Scarpia on December 01, 2010, 04:58:06 AM
You are wrong.  The microsoft document you quoted says that Windows Explorer will not be able to access a file as a network share if the total path is longer than 259 characters.  There is a restriction on the length of string explorer can use to specify a network share.

I did say that I posted that link by accident, and noticed it wasn't even referring XP only later.

QuoteThat does not mean that the file can't be created or accessed locally with a longer path.  For creation of the file on NTFS the limit is 255 unicode characters in the filename itself (independent of the path to the filename).

Did you go though the second link?
Regards,
Navneeth

Scarpia

Quote from: Opus106 on December 01, 2010, 05:15:52 AMDid you go though the second link?

If it was the wrong link why didn't you edit your document to put in the right one.  And what second link are you talking about?

Opus106

Quote from: Scarpia on December 01, 2010, 05:20:46 AM
If it was the wrong link why didn't you edit your document to put in the right one. 

:-[

QuoteAnd what second link are you talking about?

http://msdn.microsoft.com/en-us/library/aa365247%28VS.85%29.aspx#maxpath (I apologise for not making it easier to spot. It's the part that says "XP" two posts ago.)
Regards,
Navneeth