Forum     

Go Back   Digit Technology Discussion Forum > Software > Open Source
Register FAQ Calendar Mark Forums Read

Open Source A place where you can talk to like-minded people about the fastest growing software movement today! Discuss anything and everything about Open Source software and Operating Systems.


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 19-12-2004, 11:39 AM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: Nov 2004
Posts: 13
Default a c progam source code needed


hi

i am working on a simple home based c project. I am a beginner in this and need a c program which when invoked will give me the names of the files in the directory.

This should be accomplished by giving me the single name of the file as a variable, so i can manupulate or sort them as i want.

just a simple basic code will do.

thanks for ur time
simplegeek is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 24-12-2004, 11:21 PM   #2 (permalink)
Apprentice
 
Join Date: Feb 2004
Location: Chennai,India
Posts: 99
Default

I really cant understand your question.
If you wanted to display all the files in the current directory, you can pass the ls command to a function called system()

Code:
#include<stdio.h>
main()
{
    system("ls");
}
If this is not what you expected, then please reframe your question.
__________________
Next message in %d minutes
cnu
http://feeds.feedburner.com/fslog.gif
cnukutti is offline  
Old 25-12-2004, 04:00 PM   #3 (permalink)
Broken In
 
Join Date: Nov 2004
Location: BIOS
Posts: 101
Default

LOL it is better to use ls. Anywasy see source code of ls it will guide you as well as teach you more
__________________
Who am I? What am I doing? Why this happened to me? Are you stuck in life? Then read the most age old “Bhagwat gita” to solve all mysteries of life.
nixcraft is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by Charan

Advertisement




All times are GMT +5.5. The time now is 05:19 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2