Hi all,
The answer to what's happening here is very simple. It's not your Windows Phone software, it's not your desktop Windows and (partialy) it's not your USB cable. It's just a simple physic matter.
I own a Nokia Lumia 1020 since 2013, the one with 64 GB of storage. When the phone starts connecting and desconnecting loop, that means that the microUSB of the phone was damaged. This was happening lately to me too, and from the attached
photo you can clearly see that the real microUSB connector is slighty backward inside the metalic hole that is with the case, like if someone would have pushed it. Well, in fact that "someone" is you and why this happens?
Well, after opening and dissasemble 4 times the phone for microUSB replacement, I can assure you that this happens due to 2 facts:
1.- The microUSB quality of the Nokia Lumia 1020, remind me the bad quality of that same port used in the Nokia N900. With that phone (Nokia N900), you have to use a special microUSB cable with the downside fangs (that are used to maintain connected the cable to the phone) the softer posible you can get, because if not, even using the official cable, it will broke internally, making it impossible to connect again (the only way was to weld it again by yourself). You can check this kind of problem in some N900 forums (
http://talk.maemo.org/showthread.php?t=75920).
In this N900 case, the problem was when you pulled the cable from the phone, but in this current case (Lumia 1020) is that you are pushing it inside the phone little by little. And how is it you should ask...? well, get 3 or 4 microusb cable used for charging or for data and observe that the metalic final part (the one that goes inside the phone) doesn't have the same lenght. It slighty differs from one and other. That take us to the second fact:
2.- You, or anyone that used the Nokia Lumia 1020, used a microUSB cable, for charging or to transfer data, that had LONGER metalic connector that the space the phone has to allocate it. With the time, that make the connector to get backward little by little, and get us to the day that it will only charge and nothing more. But, why it would be still charging and pseudo connecting to the computer? well, that's due to the USB design.
Check this USB diagram:
https://i.pinimg.com/236x/1b/55/53/1b55538e7724af9236ba13c10c3b7257.jpg As you can see, the data connectors are slighty backward compared to the power connectors. You can check that this is true in any USB cable. Well, this is an old USB A diagram but the connectors used for data in a microUSB are also slighty backward with one difference, the microUSB connector has 5 pin connectors instead of 4 as you can see here (
https://i.pinimg.com/236x/a7/c1/02/a7c102bd0d1c685813c5cf90c2e97e8f--samsung.jpg). The fourth pin connector is not as back as the data connectors and enough to connect to the USB port, starting the connection that can not be completed due to the fact that the data connectors are not touching those inside the phone microUSB.
To sum up. You have two options here:
1.- Replace the damaged microUSB with a newer one and don't lend the phone to your childs (my case) that will connect any cable with any imaginable force.
2.- Open the phone and put some kind of glue or silicon just before the microUSB connector, so it won't be able to be pushed back again with any kind of microUSB cable.
That's all.
Regards,
Akuma.