I guess it will work, but if the material can be filed, it's a whole lot quicker. If the material can't be filed, and if the part is small enough, I've sometimes "lapped" it on an old marble table top with a piece of emery cloth taped or glued (with rubber cement) to the marble. This is a method sometimes recommended for fixing Stanley planes that are new and which therefore suck.
I have a good collection of files and I save my best ones for jobs like this. If the part is work-hardened steel or c.i. and kind of hard, striking with a file can be iffy. If the file skates you'll wreck it. The file has to bite. But my piece of RR track was no problem, despite lots of work-hardening from years of use.
-- Ed Huntress