This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
 
subject: Listing all directories from a given root in batch file
 
Similar Threads
question about weblogic 6.1
BreadCrumb trail
Remote Debugging the Oracle Weblogic 10.3.3
how to redirect the tomcat (5.0) console output to a text file
Chapter 6 from K&B question 12