This is more like dir /S

The code seems pretty alright but since you use strcpy you really should make find_subdir a null-string after allocating (*find_subdir = 0).

To make an output open a file if there's an argv[2] argument an put your output to that file.