Sunday, April 10, 2011

Keep Your Folder Names Short

256 characters, maximum. That's all you have from the first character in "C:\..." to the last character in "...xxxxx.rar".

Here's an example of when that's a problem:

Let's suppose you acquire or download an album or even a single song, and the person who put this collection together gave it huge long file name so you'd know what it was. For example, you might see something like, "madonna_like-a-virgin_live_1992_super_rare_version_with_special_guest_Kate_Bush_and_Suzanne_Sommers.rar"
If you count how many characters that is, I'm sure it fit fine while it was on the creator's drive. What I've quoted above is 103 characters. If you add "C:\Documents and Settings\Nina_Lolobridgita\Documents\Music\" to the front of that and you can see how long that file name actually has become. Then copy that to a folder on the desktop called "Nina's Other Music Folder". All that added together IS the real name of the file, and if it's more than 256 characters, some bad things will happen; the least of which is that it will be very difficult to back up your music because whatever you are backing up to also follows the same 256 character limit and it will likely complain, or not copy at all and just tell you "an error has occured!"
Sometimes I have to back up people's stuff before I wipe their drive and re-install Windows. I have a licensed version of a really cool program called Vice Versa. It's basically an "X-copy" program (which was the command used to copy everything back in the DOS days) but with a Windows style formating. It comes in VERY handy for backing up data. What's really handy about it is that it can copy and move past files it is unable to copy without coming to a grinding halt to tell you about it.
When you copy and paste in Windows, and if you have a lot of stuff to copy and paste, what happens is that it will start copying until it finds a file that there is a problem with such as it's "read-only" or "file name too long," it will stop and tell you about it but the only solution it offers after that is to say "OK". Then what? You have to rectify the problem, then copy it all again. There's no easy way to make sure of how much or what you've already copied, so you have to start all over again and it will ask you, "Some of these files are already there, would you like to overwrite the existing files?" And of course, if you say "no" the process stops, and if you say "yes" then you are copying again the same stuff you had already copied before. Once you've done this a few times in a row, it gets really annoying and you just want to cry out and scream, "There's got to be a better way!!"
Okay, so I got a little off track there. What I'm saying is that you will invariably have problems if you allow your file names to get too long. Be careful when you unzip or uncompress a file with a long name. It is easy to open up a long filename folder as a .zip or .rar and make it so that it will create a new folder with the same long filename inside of a folder with the same long filename. Try to keep an eye out for this before it becomes a problem.
Keep your folder names short.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.