I want to create a batch file. When it is invoked as batch.bat MyProject
or batch.bat MyProject/
it will produce the following list. Note that Dir
is a sub directory of MyProject
. I am using Windows 7.
Dir
Dir/SubDir1
Dir/SubDir1/SubSubDir1
Dir/SubDir1/SubSubDir2
Dir/SubDir2
Dir/SubDir2/SubSubDir1
Dir/SubDir2/SubSubDir2
Dir/SubDir2/SubSubDir3
Dir/SubDir3
Dir/SubDir4
How to write a list of directory trees to a text file?
File names must be excluded.