Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My job involves receiving and processing a lot of CDs containing photos and scanned documents from clients who are not very good with computers. I sometimes receive discs full of files with pathnames that read like this:

/photos of my house after all the mold got started/photos of the living room and dining room and bathroom/photos of the bathroom only not the living room and dining room/photos of the bathroom towels/photos of the pink bathroom towels only/photos of the pink bathroom towels with spots/as you can see this towel is just totally covered with green mold it looks like a forest on there i swear to god (3).jpg

I have to copy the contents of each disc to a fileserver. Windows Explorer on Windows 7 (which is what the fileserver and all the office computers use) does not allow you to copy-and-paste files or directories with a pathname of over 259 characters. I can brute-force the transfer using Robocopy, but I can't ask my co-workers to do the same thing when they need to copy or move one of the files or directories in question.

The information in the file and directory names is important, so I also can't just use a shell script or something to truncate each one to 8 characters. And I can't just keep going through each disc and manually renaming everything, copying all the descriptions to a text file as I go; I have only a limited number of hours on this earth, and I have already wasted too many of them doing this.

As I have yet to come across any way to make Windows Explorer put on its big kid pants, my ideal solution for this would be some sort of software that can flatten the contents of the disc out, shorten the filenames, and produce a single index file of some kind containing all the old pathname information. If the index were in HTML format with links to the individual files, my life would be complete.

Failing that, I'm open to any other suggestion that will keep me from having to do this by hand.

The following are not viable solutions: I can't give each client a course on the Windows filesystem and tell them to clean up their discs, I can't "fire" the clients, I can't throw out their discs and pretend I didn't get them, I can't train all my co-workers in how to use Robocopy, and I can't switch the whole office over to Ubuntu.

share|improve this question
    
There isn't a real solution at least that doesn't involve a hack –  Ramhound Jun 20 '12 at 18:57
    
when someone solves my question, your question will be solved :) superuser.com/questions/439787/… –  kokbira Jun 21 '12 at 14:49
add comment

3 Answers

would 7-zip help?
Archive the files, and the path information is preserved, and then the user can click through (and read) the folder names while getting to the appropriate file.

share|improve this answer
    
I do this sometimes as a stopgap, but it's not really a solution; when we browse the files, we often need to be able to see all of them at once, without checking through the often-inappropriately-named directories. We really need something that would flatten the directory tree. –  Snarp Jun 21 '12 at 17:28
    
then pkzip - zip everything up, then extract them without the directory structure. You may have to use the command line version to do this step –  Sean Cheshire Jun 21 '12 at 17:36
add comment

To save the current directory structure, you could use something like tree. Then to flatten, you can just get a list of all the files using dir /s and copy them with the xcopy command to any place you want.

To create the HTML document would be more challenging, but I don't think it will solve your problem. Your co-workers will either not be able to see the files (as they are on your machine), or they will still have to deal with the files on the server and have the same issues that they have now.

share|improve this answer
    
The first suggestion unfortunately doesn't solve the issue of very long filenames; I'd still have to rename those by hand. Not sure what you mean by the second part. I'd be putting the HTML file and the flattened directory on the server; that's the point of this. –  Snarp Jun 20 '12 at 19:33
add comment

There are several GUIs for robocopy that should allow your coworkers to use it.

The simplest is probably Robocopy GUI.

screenshot

You could also try RichCopy, which has much more functionalities than Robocopy GUI.

screenshot

However, the TechNet article isn't specific if it's not a GUI for robocopy or not just a GUI for robocopy, so it might not work with overly long path names.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.