Is it foot rot or scald?
Does it smell?
If scald, get them in the dry and use blue (not purple, you need the big guns for this) spray from the vet.
If it is foot rot....Engemycin injection from the vet if bad. Keep em in on clean dry bedding. Careful trimming and spraying being sure to expose all infection to the air.
Keep them fed well as mine, especially Enid dropped weight like nobodies business when shee got foot rot this year.
With Enid it has taken 2 months to right it. I also bought some hoof paste which appears to be marvelous stuff.
Then look into why it has happened. Obviously the bacteria has to be around, but in my case I didn't trim as much as normal as I don't like trimming with poor ground conditions. What I should have done was trimmed and kept them in.
It will take me a fair time to repair the damage that I could have prevented