Moving mass of caterpillars
Your photo did not attach, but we know what you are referring to because this is a big year for this phenomena.
This is a fungus gnat larvae migration. They are not parasites or worms or caterpillars.
Fungus gnats lay their eggs in moist soil, and their eggs hatch into larvae that eat fungi in the soil. They are not a problem. The ones in your photo will either die or enter the soil under the concrete. No treatment is necessary.
Occasionally in some years, we'll have the exact weather conditions that favor their growth. Then may be sightings of a fungus gnat larvae migration. It's an interesting phenomena, that's all. No cause for alarm. You can see plenty of photos in a search online. They will even form circles, or flow like a stream and split and reform. Crazy!
Here is more about fungus gnats from our website: http://extension.umd.edu/hgic/fungus-gnats