List Files and Directoy reverse
Posted: 30 Jan 2011 02:25
Hello,
I need to get a list of files and directories in a pathname.
The important thing is to have the directory "fathers" at the bottom of the list.
Example. From...
directory
try4.txt
try5.txt
directory\directory2
directory\directory3
directory\try3.txt
directory\directory2\try.txt
directory\directory3\try2.txt
to:
directory\directory3\try2.txt
directory\directory2\try.txt
directory\try3.txt
directory\directory3
directory\directory2
try5.txt
try4.txt
directory
I tried using all the parameters of 'dir' (sort, etc) but there's nothing that gives me this result.
Thanks!
I need to get a list of files and directories in a pathname.
The important thing is to have the directory "fathers" at the bottom of the list.
Example. From...
directory
try4.txt
try5.txt
directory\directory2
directory\directory3
directory\try3.txt
directory\directory2\try.txt
directory\directory3\try2.txt
to:
directory\directory3\try2.txt
directory\directory2\try.txt
directory\try3.txt
directory\directory3
directory\directory2
try5.txt
try4.txt
directory
I tried using all the parameters of 'dir' (sort, etc) but there's nothing that gives me this result.
Thanks!