If you installed Tk, you also have the widget program.
Run it, select "DirTree, diplay directory tree" in the "User contributed Demonstrations" section; in the WidgetDemo window, click on "See Code".
Well, I guess this is what you want. Where do you want to "show directory like a folder in windows"? on the Desktop, in some window, in a hierarchical list, on a button, in a menu entry, next to a textbox, as a label?
See How (Not) To Ask A Question.
<update>
The widget shown in the Tk demo is a composite widget, you'll find the source code
for that in the file DirTree.pm in your perl library folder.
</update>
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
| [reply] [d/l] [select] |
Make a set of icons, for the different types of directories, filetypes, links,etc, and put them on a canvas.
| [reply] |
If you need help with icons, see zicons-Tk-Icon-Selector. It should give you alot of icons to play with, and show how to display them.
| [reply] |
As other monks pointed out, your question is not very clear. If I understood your requirement correctly, the following node which is somewhat similar to your requirement written by GrandFather using Tk (Very nice node), Directory tree explorer with stats reporting may help you to proceed further. Some of the points in the coding may help you to start.
| [reply] |