If you don't specify any directory or you use "." as path you'll get the working directory
You can get and put single characters from the old to the new files instead of copying the entire file at once.
If you are writing C++ you should use fstreams instead of FILE*s
and it ALMOST woeks! i means it copies everything... but then there is a weird character (ÿ) at the end of the new file... foes anyone know why?
and i know i am still doing sthg wrong because i cannot repeat it (tell the program to take another file and copy it under a new name) without reseting the program. i get a memory error (acces violation at address XXXXX in module .exe) I THINK ITS STRCAT CAUSING THE PROBLEM
the +1 in newname is because the name of oldfile is sthg like XXX-YYY.txt, and newfile should be YYY.txt, so i look for the '-' and then get what is right after (next character -> pointer+1)
i checked EOF before the loop, with the same result.