Look at the photo of Confeds captured at Sailors Creek and you will not see any "rag tag" men. A fair number of uniforms and/or cloth were issued to Lee's army early in 1865, particularly to the North Carolina troops.
Trans-Mississippi Confeds were also fairly well uniformed due to trade with the French in Mexico.
This isn't to say that all Confeds were well equipped, just that it is a myth that they were all in rags and barefooted.