|You can try a free file recovery utility:|
But they are really only intended for recovery of files which have been deleted, so may not work if the pendrive is actually faulty as it seems to be. When that happens to my pendrive I simply throw it away and buy a new one. I don't lose any data because I always have that data saved on two external hard drives.
You might want to try connecting it to a different PC - that sometimes works.
I'm am always advising people who use pendrives to never save important files on them or use them for long-term storage since they are just not reliable or safe for that. They are designed only for short-term storage such as when you need to transfer data from one PC to another PC.