|
|
| No such thing as a small change | |
| PerlMonks |
Shorten windows paths too longby gj2666 (Sexton) |
| on Aug 17, 2010 at 16:24 UTC ( #855536=perlquestion: print w/ replies, xml ) | Need Help?? |
|
gj2666 has asked for the
wisdom of the Perl Monks concerning the following question:
I tried super search before I decided to post here. I understand that Windows does not support pathnames longer than 256ish. However, I have paths longer than that on disk. It seems that on my Hudson build server (win32) Java/Maven/Hudson or some other evil entity insists on writing those "paths too foul" to my disk.
The evil Java build automation developers I work with want to move the Hudson jobs to a different location, however the paths are too long and windows just whines when I try to move them. (see output at bottom) I could alter them manually by changing several paths manually, but whenever the job runs again it updates whatever was there with the current path too foul. Can't get them all renamed manually before new ones are created. So I tried something I found here the other day, but it fails to execute the move command here: (And yes, I have wicked skills, but not in a good way.) $olddirname is the full path to the dir I want to rename (shorten). $newname is the new name of the dir (no path) executed (via the ..) to position me in the parent dir of the one I want to change. My question is...what is another approach that I could make work since making a system call and using the dos commands seems to be a bust. Output: H:/softwaredistribution/hudson/jobs/Conservation_Payment_Release/workspace/trunk/target/checkout/conservation-ejb-batch/target/was6-maven-plugin; cd ..; move /Y H:/softwaredistribution/hudson/jobs/Conservation_Payment_Release/workspace/trunk/target/checkout/conservation-ejb-batch/target/was6-maven-plugin w6 Can't move H:/softwaredistribution/hudson/jobs/Conservation_Payment_Release/workspace/trunk/target/checkout/conservation-ejb-batch/target/was6-maven-plugin w6: at O:\RatlSupport_ML_dev\SRM-SoftwareDevCV\RatlSupport\Scripts\fixlength.pl line 42. Line 42 is the `H:;...` In the output above we're trying to move (rename was6-maven-plugin to "w6"). All the output in trunk and below gets rewritten on build machine each new build and never commits to the SVN repository to it's okay to change on this server. Thank you for your time and patience. gj
Back to
Seekers of Perl Wisdom
|
|