Hello,
I'm trying to add a progress bar to a file find function. Below is the code that I have and I'm not sure how to incorporate the progress to step through the search.
What I have are several input boxes, that allows the user to type a drive letter and the below code will search for a specific file, then writes all the paths to a txt file.
Thanks!
I'm trying to add a progress bar to a file find function. Below is the code that I have and I'm not sure how to incorporate the progress to step through the search.
What I have are several input boxes, that allows the user to type a drive letter and the below code will search for a specific file, then writes all the paths to a txt file.
Thanks!
Code:
get = Input.GetText("Input1"); get2 = Input.GetText("Input2"); Registry.SetValue(HKEY_CURRENT_USER, "Software\\DriveGuard", "DriveLetter", get, REG_SZ); Registry.SetValue(HKEY_CURRENT_USER, "Software\\DriveGuard", "DriveLetter2", get2, REG_SZ); does_exist = Drive.GetInformation(get); if get == "" then --Dialog.Message("Notice", "blank", MB_OK, MB_ICONINFORMATION); elseif does_exist then my_docs_path = get; search_results = File.Find(my_docs_path, "_TEST_File.html", true, false, nil, nil); message = "_HTML_instructions.html was found in the following location(s). Click OK to delete the file(s):\r\n\r\n"; for index, path in pairs(search_results) do message = String.Concat(message, path.."\r\n"); --TextFile.WriteFromString("C:\\ServerGuard\\Results.txt", "------ WARNING -----\r\n", true); TextFile.WriteFromString("C:\\ServerGuard\\Results.txt", System.GetDate(DATE_FMT_US).." | "..System.GetTime(TIME_FMT_AMPM).." | File(s) found at " ..path .." .\r\n", true); --TextFile.WriteFromString("C:\\ServerGuard\\Results.txt", "File(s) " ..path .." .\r\n" , true); end end
Comment