shaahin Posted October 8, 2006 Share Posted October 8, 2006 hello I want to make a program to save a drive structure (with all files and folders in all levels) in a text file (and also show it in a treeview) that i can load it later for compare . I need somthings like 'Folder Bar' in 'My Computer' (Include files). I can do that for first level of drive, my problem is subfolders and other levels. Sombody here can help me? I wrote a simple example (Without Save\Load Function). i Hope it help other to understand what i need. I am waiting... here is my simple code: #include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> #Include <GuiTreeView.au3> $FileList=_FileListToArray("c:\","*.*",0) GUICreate("") GUISetState() $tview=GUICtrlCreateTreeView(0,0,400,400) for $i= 1 to $filelist[0] $Folder=GUICtrlCreateTreeViewItem($filelist[$i],$tview) searchinside("D:\"&$filelist[$i]&"\") Next While 1 $msg=GUIGetMsg() if $msg=$GUI_EVENT_CLOSE then Exit WEnd func searchinside($searchstring) $FileList2=_FileListToArray($searchstring,"*.*",0) if IsArray($filelist2) Then for $j=1 to $FileList2[0] $Folder2=GUICtrlCreateTreeViewItem($filelist2[$j],$Folder) Next EndIf EndFunc Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 8, 2006 Moderators Share Posted October 8, 2006 (edited) hello I want to make a program to save a drive structure (with all files and folders in all levels) in a text file (and also show it in a treeview) that i can load it later for compare . I need somthings like 'Folder Bar' in 'My Computer' (Include files). I can do that for first level of drive, my problem is subfolders and other levels. Sombody here can help me? I wrote a simple example (Without Save\Load Function). i Hope it help other to understand what i need. I am waiting... here is my simple code: #include <GUIConstants.au3> #Include <File.au3> #Include <Array.au3> #Include <GuiTreeView.au3> $FileList=_FileListToArray("c:\","*.*",0) GUICreate("") GUISetState() $tview=GUICtrlCreateTreeView(0,0,400,400) for $i= 1 to $filelist[0] $Folder=GUICtrlCreateTreeViewItem($filelist[$i],$tview) searchinside("D:\"&$filelist[$i]&"\") Next While 1 $msg=GUIGetMsg() if $msg=$GUI_EVENT_CLOSE then Exit WEnd func searchinside($searchstring) $FileList2=_FileListToArray($searchstring,"*.*",0) if IsArray($filelist2) Then for $j=1 to $FileList2[0] $Folder2=GUICtrlCreateTreeViewItem($filelist2[$j],$Folder) Next EndIf EndFuncLooks like the same topic, and the same lines of code as http://www.autoitscript.com/forum/index.ph...st&p=245353 Edit: Is that the same thing you are trying to do? Edited October 8, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 8, 2006 Share Posted October 8, 2006 (edited) Hi, what something like this: RunWait(@ComSpec & ' /c tree c:\ /F /A > c:\tree.txt', '', @SW_HIDE) So long, Mega Edited October 8, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
shaahin Posted October 8, 2006 Author Share Posted October 8, 2006 1- yes it is, i need that till yet. 2-thx th.meger. i tested it before, but i want to save it for use it later in a TreeView? do u have good idea for do that? (i mean c:\tree.txt file in TreeView control? Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 8, 2006 Share Posted October 8, 2006 HI, why do you want to have it in a treeview. Above you mentioned that you need it to compare. It is much easier to compare txt-files than treeview, I suppose. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
shaahin Posted October 9, 2006 Author Share Posted October 9, 2006 yeah. it's hard to explain, but i want to browse the structure and select, everywhere i want and then compare it. is it impossible to create a folder structure in Autoit? other programmers how do that in Delphi or ...? i mean if they want create it manually(Not use native Delphi controls) thx Link to comment Share on other sites More sharing options...
shaahin Posted October 10, 2006 Author Share Posted October 10, 2006 hey ... really there is no way? Link to comment Share on other sites More sharing options...
shaahin Posted October 14, 2006 Author Share Posted October 14, 2006 OK. I think there is no way ... Cool Link to comment Share on other sites More sharing options...
Xenobiologist Posted October 14, 2006 Share Posted October 14, 2006 HI, surely there is a way, but it is a long way to go - and I don't why I should go it. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now