Your code is kind of a mess, although maybe that is mostly due to not using BBcode for code:
[code][/code]
I didn't want to do this for you, but I sorta did so sorry about that. I hide it behind a spoiler tag.
Couple notes:
For for() loops, usually you initialize and declare the integer you are going to use in the actual loop itself. IE for (int i = 0; i < 10; i++)
char types are for a single char. I took your char ch out because it didn't seem necessary to save s[a].f_name locally (and it was busting up the program.) 'Z' or 'z' could be a char, but not "ZZ."
For string comparison, you have to use strcmp() which takes two const char * and returns 0 if they're the same . It returns negative or positive otherwise (see http://en.cppreference.com/w/c/string/byte/strcmp)
Depending on what you meant by "quit" you need to exit() or possibly return 0. exit() requires that you include stdlib.h so that's what I did.
Most of your code seemed pretty good though. I'm a C noob so this info may be incomplete or just wrong. I did no testing of your code other than seeing if I could get ZZ to work.