View the Most Wanted LQ Wiki articles.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-12-2004, 01:39 PM   #1
LQ Newbie
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
listing files in to an array


I need to list all the file from a directory,so that i can iterate each filename in to a variable and hence this file name can give arguments to the oowriter
for generating pdf..

i request a script for storing all the file names in to an array from the directory

Adavance thanks

Old 12-12-2004, 03:14 PM   #2
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,547

Rep: Reputation: 160Reputation: 160
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.

It'd be something like
for i in *; do yourcommand; done
where in yourcommand $i means the file, so (imaginary example) mkdir $i will result in creating a new directory.

Of course, it depends on the language/shell you want to use.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
listing all files of a certain user X-GhoSt Linux - General 1 10-22-2005 04:22 AM
listing files in a directory Linh Programming 7 05-17-2004 05:35 AM
Listing files from within a C program? PsychosisNode Programming 4 11-16-2003 11:40 AM
listing large files fintan Linux - Newbie 7 11-06-2003 12:40 PM
listing files in apache im1crazyassmofo Linux - Software 0 07-27-2003 06:05 PM

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration