Good Day,
As u can see I have been away from programming for a while and I have a task that desperately needs me finsh a program. I am trying to use the rename(arg1,arg2),feature of c to rename files on the system. Since the path to these files are long I need to be able to concatenate a few char arg[] into one char arg[]. It is not working though!! Any tips?
Muthu
PS: here is what I did
int main()
{
int result;
for (int counter = 101;counter<=450;counter++)
{
char str1[] = "C:/";
char str2[] = "ABC/bbb/testing";
result = rename(str1+str2+counter+".txt","C:/newfolder/newfile.txt")
)
}
As u can see I have been away from programming for a while and I have a task that desperately needs me finsh a program. I am trying to use the rename(arg1,arg2),feature of c to rename files on the system. Since the path to these files are long I need to be able to concatenate a few char arg[] into one char arg[]. It is not working though!! Any tips?
Muthu
PS: here is what I did
int main()
{
int result;
for (int counter = 101;counter<=450;counter++)
{
char str1[] = "C:/";
char str2[] = "ABC/bbb/testing";
result = rename(str1+str2+counter+".txt","C:/newfolder/newfile.txt")
)
}