![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| Vista Home Premium 32bit | copying file with a long fullname Hi guys. I'd like to copy all the files of a unit that have a fullpath length greater than 255 chars. I wrote this gci -rec | ? {($_.fullname).length -gt 255}| % {copy-item $_ c:\longfiles} but just one file has been copied. For all the others powershell returns me an error that says that it's impossible to find the path because it doesn't exist. Where is my mistake? |
My System Specs![]() |
| | #2 (permalink) |
| Vista Home Premium 32bit | Re: copying file with a long fullname Stupid me. ![]() copy-item $_.fullname now it works. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: copying file with a long fullname "sardinian_guy" <guest@xxxxxx-email.com> wrote in message news:27e8c687d8ebfd12940af73e9b91bad8@xxxxxx-gateway.com... Quote: > > Stupid me. ![]() > > copy-item $_.fullname > gci -rec | ? {!$_.PSIsContainer -and (($_.fullname).length -gt 255)} | copy-item -dest c:\longfiles -- Keith |
My System Specs![]() |
| | #4 (permalink) |
| Vista Home Premium 32bit | Re: copying file with a long fullname Thank you very much Keith. ![]() I've another question. I'd like to copy the fullpath of these files on a txt file. So I wrote this gci -rec | ? {!$_.PSIsContainer -and (($_.fullname).length -gt 255)} | ft fullname > c:\longfiles.txt but the fullpaths are not showed entirely and for each line just appears the beginning of the name with three final points. I've seen that with the switch -wrap I can show all the paths but I would like to have each path on just one row of my txt file. Is it possibile? Thanks again. |
My System Specs![]() |
| | #5 (permalink) |
| Vista Home Premium 32bit | Re: copying file with a long fullname With a google search I found this post that have solved my problem. How do I get format-table to drop that omission points (...) and display my data gci -rec | ? {!$_.PSIsContainer -and (($_.fullname).length -gt 255)} | ft fullname | out-file -width 350 c:\longfiles.txt This forum rulez. Thanks again keith. |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| multiselect file open dialog that supports long file names | VB Script | |||
| HOW LONG?! Copying files. | Vista General | |||
| Copying Takes Very Long Before Actually Starting to Copy | Vista performance & maintenance | |||
| Fix for long, long, long deleting and copying of files? | Vista General | |||
| coping file from a remote file share - FILE IS NO LONG THERE bogus error message | Vista networking & sharing | |||