aspose file tools*
The moose likes General Computing and the fly likes Listing all directories from a given root in batch file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "Listing all directories from a given root in batch file" Watch "Listing all directories from a given root in batch file" New topic
Author

Listing all directories from a given root in batch file

Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
How can I list all directories from a batch file from a given root path. Ideally I'd like to list the full path to the directory, equivalent to this Java code



The last thing I came up with was:

Which does list all the directories given a starting directory, but it just list the directory name, not the path


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
OK, so I found one way using the %CD% "pseudovariable" that gives the current directory



I'd imagine that there is an easier way than this, but I haven't figured it out yet.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Listing all directories from a given root in batch file