aspose file tools*
The moose likes Linux / UNIX and the fly likes how to iterate file list of subdirectory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "how to iterate file list of subdirectory" Watch "how to iterate file list of subdirectory" New topic
Author

how to iterate file list of subdirectory

manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181

I have one script which processes files one by one. I want to automate this to process all the files in one subdirectory. So I tried the following script buts its giving me error 'ls: invalid option -- 2'



Any idea what am I doing wrong here?


love your job and not your company;
...because you never know when your company will stop loving you!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

Just out of curiosity, was it necessary to be so complicated?

Try this instead:


Customer surveys are for companies who didn't pay proper attention to begin with.
manoj r patil
Ranch Hand

Joined: Jun 06, 2002
Posts: 181
I want file names and this will give me path along with file name like

Tim Holloway wrote:Just out of curiosity, was it necessary to be so complicated?

Try this instead:
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

S. Nitesh
Ranch Hand

Joined: Jan 15, 2010
Posts: 36
    
    1

You can try this...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to iterate file list of subdirectory