i have a problem. I want to rename multiple files, and they are named like scan1.pdf scan2.pdf, scan3.pdf and so on. I want to change only the numbers at the end of the file.
I used this code for renaming one file
i would like to if there is any way, that i could use
int main ()
char oldname ="oldname.txt";
char newname ="newname.txt";
result= rename( oldname , newname );
if ( result == 0 )
puts ( "File successfully renamed" );
perror( "Error renaming file" );
for (i=1,i<=n,i++) and put the parameter i in the oldname.txt?
I hope you understood.