Measurements of the critical current densities of epitaxial thin films of the non-magnetic borocarbide compound YNi2B2C and the magnetic HoNi2B2C have been performed under varying conditions of temperature and applied magnetic field. The critical current is seen to vary in a highly anisotropic manner depending on whether the field is applied within the plane of the borocarbide unit cell or perpendicular to it. At the lowest measured temperature (2 K), the critical current density in zero field exceeds 2.5 MA cm(-2) in YNi2B2C and 1.4 MA cm(-2) in HoNi2B2C, but these values are rapidly suppressed under application of a magnetic field. (C) 2003 Elsevier Science B.V. All rights reserved.