-
Extended Filenames
Hello,
I have a program that creates a text file depending on the name I give it and it renames it if the directory already Has a file of that name in it, the thing is that if the filename I give it is already 8 characters and it tries to put a 1 on the end my program goes in to an endless loop.
could anybody help me with using extended filenames.
Thanks.
-
Sounds like your filename functions are restricted to returning names of no more than eight characters. Borland 4.5 - that's ancient isn't it?
What you could do is this. If the file name is 7 or less in length, add a character, as you do now. However, if the filename is 8 or more, change (increment) the 8th character instead.
-
Thanks,
I have already started on that process, it's just a simple if and sizeof() thing, I was just wondering if I could use extended filenames, maybe for future reference but for now would be good too.
If I changed my compiler would that make a difference, I thought that the 8 character limit was an operating system thing, am I wrong.
Yes my compiler is ancient but it was free and it has served its purpose so far, If you think I should change I will.
Any recomendations????
-
The 8 letter thing is a legacy from DOS.
Borland offer a newer compiler for free....also, there's Devc++ which uses Mingw.....