Saturday, December 8, 2012

7-Zip saves my hide (at least got me around long paths)

Recently I had the simple task of adding more storage space to a Windows server. As usual, everything went well as far as the hardware installation and the software preparation. However, when it came time to start 'moving' network shares (folders) over to the new drive, I had one (folder) that did not want to copy, giving me the following error almost right off the bat:


Oh snap!

Fortunately, my friend Google never leaves me hanging. The first quick thing to try was to run CHKDSK with the '/f' (fix any errors) option on the source drive. I did, and there were a few corrections made. However, when I tried to copy that folder again, I got the same error. Uh oh.

After more searching I found a helpful Microsoft article:

It presented several possibilities, but only a few that were relevant to my situation. I was able to rule out 1 possibility - file names that had 'reserved names'. An example would be LPT1 or PRN or COM1. I ruled it out by searching for files/folders with those names in it. Of course nothing came up, but that was one of the simplest checks against the possible relevant issues.

Now things were getting a bit ugly. It was down to 2 possibilities: 1. There are one or more files that contain an 'invalid name', or 2. There are one or more paths to folders/files that exceed the 256 character limit. As far as I know, there are no built-in Windows utilities to check for either of these conditions. After poking around in my problem folder's subfolders, I started noticing that there were a couple of folders that had many, many subfolders. It looked like I found the culprit. This is a good and bad thing. Good because now I know what the problem is, but bad because I'm not sure how to get around it.

A little more searching around on Google for programs that could copy folders without the restriction that Windows itself has found me a possible solution - 7-Zip! It is a program that I already have on this particular server as it is the destination file format (.7z) for the nightly/monthly backups. Upon opening the program and initiating a folder copy of that annoying little (ok, not little - it's about 25 GB) folder, it started copying with no problem! Yaaayyy!

Real quick, I'd like to say that 7-Zip is a great compression/decompression utility with better compression than .zip files, supports a bunch a formats, and is free! Check it out - it's better than the other ZIP/compression utilities that I've tried (including commercial ones).

Well, I hope that this helps someone out there. Feel free to leave any comments/suggestions below.

2 comments:

  1. Hi Jamie,
    You've turned out to be quite a writer. Sounds like you work for Google, or Windows, or Microsoft. ;-) Wow! I like it! One thing I always worry about tho.... How do you know if this 7.Zip gives/ gave you any viruses? Thx for the info, and congrats on being so smart ;-)

    ReplyDelete
    Replies
    1. Thank you for the kind words. 7-Zip did not give me a virus. 7-Zip is a well-known, respected software program that is used to compress/decompress files/folders. The proper place to download it is www.7-zip.org. You shouldn't download it from anywhere else, unless you are sure it is a trusted location.

      Delete