Hi-
Trying to rename a file using the rename() function. It works, but it appends an '@' to the end of the renamed file.
Here's my code:
char oldname[] ="file1.csv";
char newname[26];
newname[0] = '3';
newname[1] = '1';
newname[2] = '1';
newname[3] = '3';
newname[4] = '3';
newname[5] = 'I';
newname[6] = 'n';
newname[7] = 'v';
newname[8] = 'e';
newname[9] = 'n';
newname[10] = '2';
newname[11] = '0';
newname[12] = date[6];
newname[13] = date[7];
newname[14] = date[0];
newname[15] = date[1];
newname[16] = date[3];
newname[17] = date[4];
newname[18] = time[0];
newname[19] = time[1];
newname[20] = time[3];
newname[21] = time[4];
newname[22] = '.';
newname[23] = 'c';
newname[24] = 's';
newname[25] = 'v';
result= rename( oldname , newname );
This works, except it appends the @ at the end of the new file. Any ideas on how to remove that? (The date and time arrays are defined earlier in the program)