Read file name?

This is a discussion on Read file name? within the C Programming forums, part of the General Programming Boards category; I have download lot of patches for Windows. And I dont want to write it all into C program or ...

  1. #1
    Registered User xxxrugby's Avatar
    Join Date
    Jan 2005
    Posts
    178

    Read file name?

    I have download lot of patches for Windows. And I dont want to write it all into C program or cliking on it one by one.

    How can I make that program read names from files who are in folder.

    And it need to work something like this
    Code:
    include <stdio.h>
    
    int main
    {
       char patch_name[30];
      
       /*take file name from folder until gets the last in folder*/
       printf("%s", patch_name);
       system("%s", patch_name);
    
       return 0;
    }
    Sorry for spelling errors, not English!
    xxxrugby: "All Human Race Will Die From My Hand!"
    xxxrugby: "We are all philosophers, when question is about politics!"

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User xxxrugby's Avatar
    Join Date
    Jan 2005
    Posts
    178
    Thank you.
    I must remember this that I look at the FAQ first!
    Sorry for spelling errors, not English!
    xxxrugby: "All Human Race Will Die From My Hand!"
    xxxrugby: "We are all philosophers, when question is about politics!"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 01:36 PM
  2. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 05:54 PM
  3. Encryption program
    By zeiffelz in forum C Programming
    Replies: 1
    Last Post: 06-15-2005, 04:39 AM
  4. Hmm....help me take a look at this: File Encryptor
    By heljy in forum C Programming
    Replies: 3
    Last Post: 03-23-2002, 10:57 AM
  5. Need a suggestion on a school project..
    By Screwz Luse in forum C Programming
    Replies: 5
    Last Post: 11-27-2001, 02:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21