User Profile
Collapse
-
Thanks for the help - I just went to C++ instead of C. In C++ it was really easy to accomplish what I was wanting to do. If I need anything else in the future (and I probably will) then I know where to come. -
Here is a sample program for me to try to get an answer with
[code]
#include <stdio.h>
#include <stdlib.h>
int main()
{
char ch, file1[2000], file2[2000];
FILE *fs,*ft;
printf("Enter name of file to copy ");
gets(file1);
fs = fopen(file1,"r" );
if( fs == NULL )
{
...Leave a comment:
-
Yes you are right - I had misunderstood what you where saying.I will make each file a menu choice and then have the program open the chosen file and copy to myfile.conf. I will start with a simple program for now and then later add the functions to input the filenames for the menu choices as a separate menu item. I will let you know how everything works out when I am finished. Thanks for the tip.Leave a comment:
-
That is what I am doing now manually - But I have multiple files that have to be switched sometimes over a dozen times a day.What I am needing is to make a program with a GUI where I can just select which file to use from a list. It will then need to rename the previous file to it's original name and rename the new one to the proper program name ( ex. - myfile.conf). There are over a dozen configuration files for different uses but the program can...Leave a comment:
-
no - It is a configuration file that has to have a certain name
I was thinking of adding a comment to the top of each file so that it can be used for the renaming process (ex. - #bob)
I am not sure if this would be the best way to solve the problem though - so any suggestions would be appreciated.Leave a comment:
-
switching between file names in c code
I have multiple text files and want to be able to switch between them. they are configuration files and only one at a time needs to have the name myfile.conf. It would be nice if each of the files would change back to a certain file name when they are not the "active" one.
example: files - bob.conf, jill.conf, sam.conf and an active file myfile.conf (with original name jeff.conf)
change myfile.conf back to jeff.conf...
No activity results to display
Show More
Leave a comment: