You're using overt "/" here.  Is that OK, or should each be a "%c" matched by an input that's the correct directory separator for the platform ?