Renaming files named in sequence

Thank you very much!

I've tried with sprint although the compiler is throwing some errors I'm not really sure what to do with.

CODE

#include <stdio.h>

int main() {
    int issue;
    int total = 13;

    for (issue = 1; issue <= total; issue++) {

        char old[50];
        char new[50];
        sprint(old, "OldFile_%d.txt", issue);
        sprint(new, "NewFile_%d.txt", issue);

        rename(old, new);

        if (rename(old, new) == 0) {
            printf("%d:Done\n", issue);
        } else {
            printf("%d:Error\n", issue);
        }
    }

    return(0);
}

CMD

rename.c: In function 'main':
rename.c:15:3: warning: implicit declaration of function 'sprint' [-Wimplicit-function-declaration]
   sprint(old, "OldFile_%d.txt", issue);
   ^~~~~~
C:\Users\***\AppData\Local\Temp\ccsLg9lM.o:rename.c:(.text+0x3b): undefined reference to `sprint'
C:\Users\***\AppData\Local\Temp\ccsLg9lM.o:rename.c:(.text+0x57): undefined reference to `sprint'
collect2.exe: error: ld returned 1 exit status

This does not compile. From what I've found, it seems it does not find the sprint function or similar?
If it matters, I'm using gcc on Windows.

/r/C_Programming Thread Parent