moombaz
asked on
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\thisisthefirstfol der\second folder\thi rdfolder\a notherfold erwhichisc alledfourt hfolder\ag ainanother folder\doc mnt.doc
\\share1\thisisthefirstfol der2\secon dfolder2\t hirdfolder 2\anotherf olderwhich iscalledfo urthfolder 2\againano therfolder 2\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?
For example - \\share1\thisisthefirstfol
\\share1\thisisthefirstfol
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please check out the 5 Resolutions given for the issue under Cause #4 in this knowledgebase article:
http://support.microsoft.com/kb/320081
http://support.microsoft.com/kb/320081
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]
You should try Robocopy for that.
Robocopy is included in the Server 2003 resource kit tools.
Usage :: ROBOCOPY source destination [file [file]...] [options]
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
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
any feedback on this ?
ASKER
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.
However, i also need a software that can copy a long path filename.
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
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
ASKER
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\thisisthefirstfol der\second folder\thi rdfolder\a notherfold erwhichisc alledfourt hfolder\ag ainanother folder\... ....\docmn t.doc
- I would want to copy the folder share1 and not docmnt.doc .
For example:
\\share1\thisisthefirstfol
- I would want to copy the folder share1 and not docmnt.doc .
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
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
Though I'm just guessing here of course!!!! Worth a shot maybe?
Pete
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
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
ASKER
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.
Try this program http://www.2brightsparks.com/downloads.html#freeware
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