char tmp[16]; sprintf(tmp,"%c",Server[client->dir]); printf("%c",Server[client->dir]); putMsg(client->sock,tmp); client->dir++; //Server is the char array that contains the file, don't mind the name //the printf is just for determining what it really is //put the string the the client //increment the file position