mclifford Posted April 7, 2008 Posted April 7, 2008 So far this is what I have, and I can select one folder under Students, but I would like to select multiple folders and store them in a variable that I can read later. From what I can tell from the help file this isn't going to do that for me, but its all that I could come up with so far. $var = FileSelectFolder("Choose a folder(s).", "C:\Students" ) MsgBox(4096, "Test", ""& $var &"", 10) Any help would be appreciated, Mike
zorphnog Posted April 7, 2008 Posted April 7, 2008 There is not any built-in support for this. What exactly are you trying to do? Can you not just have the user select a folder and then iterate through that folder structure to determine the rest of the folders? A description of the 'bigger picture' of what you are trying to accomplish may help in determining a solution for you.
spudw2k Posted April 7, 2008 Posted April 7, 2008 Sounds like you'll have to build a gui with a treeview and populate it with the directories you'll want to be able to select from in oder to accomplish what you need. Spoiler Things I've Made: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX Builder Misc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retrieve SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose Array Projects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalc Cool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF
mclifford Posted April 7, 2008 Author Posted April 7, 2008 There is not any built-in support for this. What exactly are you trying to do? Can you not just have the user select a folder and then iterate through that folder structure to determine the rest of the folders? A description of the 'bigger picture' of what you are trying to accomplish may help in determining a solution for you.Teachers are wanting to copy a file(s) to students desktops when they login. We used to have an old program that did this, but we've moved away from it and I was trying to come up with something to do this for them again. My idea was for them to select the home directories from the students drive and then do something else that will copy those file(s) to the selected students, but I haven't come up with how the second half will work since I couldn't even get the first part to work.So I want the teachers to be able to select the home directories on one side of the program and the file(s) they want to copy on the other side and then store that information and run the second half of the program or store that information for another program to read when the students login that will check to see if there ID is in the file and then copy the file(s) associated with them.That is the basic idea, I just can't even get the first part to work.Thanks,Mike
PsaltyDS Posted April 7, 2008 Posted April 7, 2008 (edited) That is the basic idea, I just can't even get the first part to work. Well, this should get you started:#include <File.au3> #include <Array.au3> ; Only for _ArrayDisplay() Global $sStudentDir = "C:\Students" Global $avDirList = _FileListToArray($sStudentDir, "*", 2) ; 2 = Folders only If @error = 0 And IsArray($avDirList) Then _ArrayDisplay($avDirList, "$avDirList") Else MsgBox(16, "Error", "Error listing directories.") Exit EndIf Edit: Typo Edited April 7, 2008 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
mclifford Posted April 7, 2008 Author Posted April 7, 2008 Well, this should get you startedCool, this looks like what I was trying to do, thanks for the help.
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