User Profile

Collapse

Profile Sidebar

Collapse
wayne jones
wayne jones
Last Activity: Jan 11 '12, 09:54 AM
Joined: Jan 6 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • wayne jones
    replied to switching between file names in c code
    in C
    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.
    See more | Go to post

    Leave a comment:


  • wayne jones
    replied to switching between file names in c code
    in C
    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 )
    {
    ...
    See more | Go to post

    Leave a comment:


  • wayne jones
    replied to switching between file names in c code
    in C
    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.
    See more | Go to post

    Leave a comment:


  • wayne jones
    replied to switching between file names in c code
    in C
    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...
    See more | Go to post

    Leave a comment:


  • wayne jones
    replied to switching between file names in c code
    in C
    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.
    See more | Go to post

    Leave a comment:


  • wayne jones
    started a topic switching between file names in c code
    in C

    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...
    See more | Go to post
No activity results to display
Show More
Working...