Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1261
  • Last Modified:

the source file path too long

I am trying to copy a folder(a parent folder) but I can't and windows prompt me an error message saying that the source file path name is too long. I've figured it out. This is due to too long names given to child folders and causing the path itself to be too long.

For example - \\share1\thisisthefirstfolder\secondfolder\thirdfolder\anotherfolderwhichiscalledfourthfolder\againanotherfolder\docmnt.doc
\\share1\thisisthefirstfolder2\secondfolder2\thirdfolder2\anotherfolderwhichiscalledfourthfolder2\againanotherfolder2\docmnt2.doc

So this path name is too long for windows to allow copy and paste. Any software that allows me to copy the parent folder(\\share1) out to another location? I need it.

Also, any softwares which allows force skip copy files if it detects any file error/file corrupt while a huge copy and paste is being carried out?
0
moombaz
Asked:
moombaz
  • 5
  • 3
  • 3
  • +3
1 Solution
 
senadCommented:
0
 
PeteJThomasCommented:
You could try sharing the "againanotherfolder2", mapping a drive to that share (like z: or something), then try copying using the mapped drive letter instead of the full path.

So just copy Z:\docmnt2.doc to wherever...

That should shorten the path considerably, and allow the copy to complete successfully...

Let me know?

Pete
0
 
torimarCommented:
Please check out the 5 Resolutions given for the issue under Cause #4 in this knowledgebase article:
http://support.microsoft.com/kb/320081

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
deroodeCommented:
on the second question: (Also, any softwares which allows force skip copy files if it detects any file error/file corrupt while a huge copy and paste is being carried out?)

You should try Robocopy for that.

Robocopy is included in the Server 2003 resource kit tools.

Usage :: ROBOCOPY source destination [file [file]...] [options]
0
 
PeteJThomasCommented:
Having reread the question, I think I got it wrong - I thought you just wanted the file, but I see you're actually asking how to copy the entire source, but have the copy operation not fall over when it hits a couple of particular files or whatever where the path is too long.

If that is the case, you should definitely take a look at robocopy, and richcopy (I prefer richcopy, as it has a much nicer GUI, allowing you to just click on all the options you want, as opposed to reading all the switches etc from a command line where there is more room for error).

You can get Richcopy here: http://www.softpedia.com/get/System/File-Management/Microsoft-RichCopy.shtml

With more info about it here:http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog

You'd be particularly interested in the error handling section, (as attached) where you can define how it will behave when it encounters various errors, and also output to a log file so you can see afterwards exactly what failed etc...
RichCopy.JPG
0
 
senadCommented:
any feedback on this ?
0
 
moombazAuthor Commented:
Robocopy and richcopy only works for the purpose of allowing force skip copy files if it detects any file error/file corrupt while a huge copy and paste is being carried out.

However, i also need a software that can copy a long path filename.
0
 
PeteJThomasCommented:
Have you tried using robocopy/richcopy in conjunction with sharing the 'final' folder in the path, and mapping to it?

That way, the source path would just end up as "Z:\" or "Z:\<FoderName>" (or whatever drive letter you choose), and then robo/richcopy can handle any errors during the copy.

I'm sure I've seen this workaround used (the sharing and drive mapping) to allow people to circumvent a problem with the path being too long...

I'll keep looking for alternatives but I'd like you to try the above and let us know what happens?

Pete
0
 
moombazAuthor Commented:
Its not that I want to copy the final item that is residing. I want to copy the whole parent folder instead.

For example:
\\share1\thisisthefirstfolder\secondfolder\thirdfolder\anotherfolderwhichiscalledfourthfolder\againanotherfolder\.......\docmnt.doc
- I would want to copy the folder share1 and not docmnt.doc .
0
 
PeteJThomasCommented:
Hmmmm ok, I see... Well I can't see that that leaves us many options...

So firstly, you're going to have problems with this down the line, so one idea might be to start renaming all the folders in this path to something shorter, starting at the root folder level and working your way down until the total file path length is under 255 characters. That's definitely the long term solution you need to look at.

Otherwise, as you've been saying, you'll need to get some software that can help...

I've been nosing around for something free, but I'm not having too much luck, except possibly here:

http://wareseeker.com/free-dos-path-spaces/     Have a look at "Path Copy 4" - I don't have it, so have no idea if it's just freeware or a trial version or something, but it sounds like it may be able to help, as it may allow you to initiate the copy of the root folder using 8.3 characters instead.

If that works as it sounds, I'd hope that it means it might run the copy like this:

\\share1\thisis~1\second~1\thirdf~1\anothe~1\... etc, thus reducing each foldername down to 8 characters max, which might allow you to circumvent the issue.

Though I'm just guessing here of course!!!! Worth a shot maybe?

Pete
0
 
PeteJThomasCommented:
Interestingly, I've just found something stating that MS Word can handle long file paths???

I don't have any folder structures anywhere close to 255 chars to it's hard to test, but this implies that maybe using the Open or Save "explorer" in Word, may allow you to drag the source folder directly elsewhere??

So you could try mapping a drive directly to the target folder, then use 'Open' in Word, locate your root source folder, and just see if it will let you drag it over to the mapped drive?

I'd be interested to see if that yielded any results... Though I remain sceptical!!!!

Pete
0
 
abolinhasCommented:
0
 
moombazAuthor Commented:
I tried map the folder so that the file path shortens and it worked. Even so, it only solves the problem temporarily. however, to take backups right from the parent folder, the problem comes again. I have yet to try path copy 4. Path too long application definately can do it but im looking for a freeware first before I make any decision.
0
 
abolinhasCommented:
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 5
  • 3
  • 3
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now