# Solved: Destination Path Too Long when Copying



## jarhtmd (Jan 27, 2010)

I copied my data folders/files from my winXP C-drive to my external hard-drive & then to my new win7 C-drive. After about 20-25 minutes of copying (with 5 seconds remaining) ... I got the attached message ... *(2 found)* ... I clicked *Skip *... same message again *(1 found)* ... I clicked *Skip *... same message again *(0 found)* ... I clicked *Skip*.

_*"You can shorten the file name and try again, or try a location that has a shorter path."*_ I compared the "JAR Control Panel Buttons" source & destination folders & found 3 files that were not copied. Not knowing how much too long the paths were, I guessed & they copied OK with shortened names.

I was just lucky. Out of 13,000 files there were a lot of possibilities. I could have had a real mess on my hands.

Is there any way to


find out before starting if there will be any errors?
effectively click "Skip for all", to prevent having to baby sit the copying process?
would clicking "Do this for all current items" accomplish this?

output complete paths of affected files to a log?
determine how many characters overflowed? How many is too many?
copy filename1 to filename2?
Would "Cancel" have stopped copying at that point?


----------



## Mumbodog (Oct 3, 2007)

1. Not really

2a. No

2b. Current items means just that, current items with the same error, if a different error happens it will pop up the dialog again.

3. Probably could be done with a script,

http://74.125.47.132/search?q=cache...+file+with+the+path.&cd=1&hl=en&ct=clnk&gl=us

4a. No

4b. 260 is the limit, see "Maximum Path Length Limitation" in the link below
http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx

5. Not sure what you mean

6. Yes.

.


----------



## jarhtmd (Jan 27, 2010)

Thanks

Is there any way to copy filename1 to filename2? 
In other words, is it possible to "copy/paste" a file, changing the name in the process?
...copy c:\folder\subfolder\filename*1* to c:\folder\subfolder\filename*2*
...not rename...create another (duplicate) file, but with a different name


----------



## Mumbodog (Oct 3, 2007)

Not that I know of.

.


----------



## TheOutcaste (Aug 8, 2007)

Only from a Command Prompt, not in the GUI. 
If it's going to the same folder you don't have to specify the path for the Destination
If there are spaces you have to use double quotes:

```
Copy [COLOR=Red][B]"[/B][/COLOR]C:\folder\subfolder\file name[SIZE=3][COLOR=Blue][B]1[/B][/COLOR][/SIZE][COLOR=Red][B]" "[/B][/COLOR]file name[COLOR=Blue][SIZE=3][B]2[/B][/SIZE][/COLOR][COLOR=Red][B]"[/B][/COLOR]
Copy [COLOR=Red][B]"[/B][/COLOR]C:\folder\subfolder\file name[SIZE=3][COLOR=Blue][B]1[/B][/COLOR][/SIZE][COLOR=Red][B]" "[/B][/COLOR]D:\Someplace Else\file name[COLOR=Blue][SIZE=3][B]2[/B][/SIZE][/COLOR][COLOR=Red][B]"[/B][/COLOR]
```


----------



## jarhtmd (Jan 27, 2010)

Thanks, Mumbodog & Outcaste.


----------

