File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Magic! Magic!

 
Moguluri Ravi Kiran
Ranch Hand
Posts: 63
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi something special here

you know how to print all the files names in the current directory with out using File class.
i found this at random. & the output is the list of files in the directory D:\Javap\



if anybody know this before please kindly explain me.

Thanks & regards..


 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moguluri Ravi Kiran wrote:if anybody know this before please kindly explain me.

How this works: If you use wildcards on the command line, like in your command:

D:\javap>java Magic *

then the Windows command prompt will expand the wildcard character * into all the filenames of the files in the current folder. So a command like that is the same as calling your program with the whole list of filenames:

D:\javap>java Magic A.class a.java Aliase.class Aliase.java ar.class ar.java ...

It's not Java that's doing this, but the Windows command prompt itself.
 
Moguluri Ravi Kiran
Ranch Hand
Posts: 63
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks .....
I didnot think that...
mistake...

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