File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to iterate file list of subdirectory

 
manoj r patil
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17625
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just out of curiosity, was it necessary to be so complicated?

Try this instead:
 
manoj r patil
Ranch Hand
Posts: 181
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 17625
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
S. Nitesh
Ranch Hand
Posts: 36
1
Chrome Linux VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this...

 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic