files and directories into an array of arrays
From: hokieghal99 (hokiegal99_at_hotmail.com)
Date: 10/31/03
- Next message: Alan Balmer: "Re: Interview question !!!"
- Previous message: Robert J. Kolker: "Re: Fundamental Reason for High Achievements of Jews"
- Next in thread: Thomas Matthews: "Re: files and directories into an array of arrays"
- Reply: Thomas Matthews: "Re: files and directories into an array of arrays"
- Reply: Peter Pichler: "Re: files and directories into an array of arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 31 Oct 2003 10:13:49 -0500
I wish to place all files and directories that are within a user defined
path (on a Linux x86 PC) into some type of array and then examine those
items for the existence of certain charaters such as "*?<>/\|\\" If one
of the chars are found, I'd like to replace it with a "-" and then
commit the change to the actual file system. I know that a scripting
language may be better suited for this, but I'm experimenting with C and
I'm trying to learn how to better use it. Here are my questions:
1. How would I collect all of the file and dir names from a specific path?
2. What type of array should I place them in?
Here is why I ask the second question. I know that C has no built-in
type for strings. I know that it uses a char array to make a string. So,
a filename would be a char array (string), right? This is where I do not
understand how to create an array of char arrays (strings). Any
pointers? I am new at C, so forgive my ignorance.
Thanks!!!
- Next message: Alan Balmer: "Re: Interview question !!!"
- Previous message: Robert J. Kolker: "Re: Fundamental Reason for High Achievements of Jews"
- Next in thread: Thomas Matthews: "Re: files and directories into an array of arrays"
- Reply: Thomas Matthews: "Re: files and directories into an array of arrays"
- Reply: Peter Pichler: "Re: files and directories into an array of arrays"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|