If you are talking about files on an SD card, don't use it, mount it on a computer (use a microSD reader if the phone doesn't support USB mass storage, which most don't) and use any file recovery software.
If you mean files that were on the phone's internal storage (and to confuse things, /sdcard = internal storage on most phones) I'm afraid they are gone.
That is what "factory reset" does - it removes everything you've put on the phone, which put it back to the state it would be if it had just comes from the factory (that is to say, if it had just come from the factory with the current software - the reset does not undo any system software updates or modifications).