I have a program that you can see below.

http://www.summeylabs.com/images/prog.jpg

It has a textbox, button, menu, and listview. What the application does is you type in a machine name into the text box hit search it will connect to the machine delete a file i have coded with in the applicatoin and then list the machine name with the status file deleted or file not found under the status column. Ok im a network ad min i have like 100+ machines so what i did was is added a menu in that menu i have open when clicked it opens the file dialog you can choose .txt files and in that is the machine names like this


machine-1
machine-2
machine -3

i am able to read them from the text box as you can see from the link above but what would be the best way to load all the machines into the list view item under machines column, then once they are all loaded it says "machines are loaded do you want to start now?" and it has ok button once clicked ok it will go through each name check to see if the file is there if not report back file not found if found delete report back deleted under status column.

also i have taken care of credentials my deleting code is wrapped in a impersonating code with my supplied net admin creds.


any idea how i would go about doing this?

if anyone needs to see my src i will show you.

thank you for your time
-Summey

Recommended Answers

All 4 Replies

Zip your project and post it. Nobody has responded to the thread so i'm guessing it was the same reason I didn't --- too much work to duplicate your test environment to provide an answer :)

i have my application working in the way i want it to but its not the most efficient way i envisioned it being. its in a for each loop watch this www.summeylabs.com/prog.avi it will show you how it acts with a few names in it but i had like 80 and it stopped responding. How would i go about making it more efficient ? Maybe multi threading or a backgroundworker ? I would like for it to go out delete the file if found report back the status if file is found or not then move to the next but at a rate that isnt going to take all day but so the app dosnt crash.

Thank you for your time

Yes, you should use a thread. I would recommend having three or four threads running since it sounds like this would take a while. You have more control over the process if you use threads but a background worker could work too. Its a design choice.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.