Saved Bookmarks
| 1. |
Solve : Batch file error? |
|
Answer» OMG! I have seen some pretty poorly written batch files but this just became #1 on my list of worst batch code I have ever seen.Here's a version of your batch file which is EASIER to debug, while still allowing individual shutdown and offline messages. Round about line 17,795 the label names and workstation numbers seem to get out of step.... There is a set of stations which are processed as a set, and several of those. Quote from: Nobody is going to be able to debug this. I had a go. Using a sed tool and extracting the essential bits and reformatting it, adding some IFs to the working bit. Foxidrive I commend you for tackling this, especially since the mood you have been in lately. Did you win the lottery down there.Quote from: Squashman on January 18, 2014, 06:55:16 PM Foxidrive I commend you for tackling this, especially since the mood you have been in lately. Did you win the lottery down there. YES!!! Last night. $18.85 The code could be simplified further - there are settings for times that could probably be all using one figure, but I left the operation mostly alone. In the stations that are processed as one set, each subsequent PC in the set gets an extra second delay to shutdown, for no good reason that I can see. PC one gets 10 seconds delay and PC ten gets 20 seconds delay.$18.85 ! ! ! Dinner's on foxidrive ! And Kudo's to you guys and the work you do here in the batch section...lemonilla you squash Salmon etc. etc....I agree with you on the shutdown time. I see no reason for that.Thank you all Dear brothers, that' is not about the employer, but about me where I want to Make a better place for myself among my colleagues and I'm trying to make a program abbreviated time and effort to gain access to network devices and deal with them instead of dealing with the ready-made programs that make us, we look for every time device computer and then press right click then CHOOSE connect then restart i want to do this in one step, It's write their hostname, and then press Enter And as you said Squashman my way in write this batch file is pretty poorly i'm just beginner but i will try and try many times till be my batch is the best in use Moreover,you should help and teach me better than laughing of me. thanks for all special thank for foxidrive for your best; And if any one has any soft COPY information about Batch's learning PLEASE, send it to me and i'll try to do all my bestQuote from: Abo-Zead And if any one has any soft copy information about Batch's learning please, send it to me and i'll try to do all my best Try looking at: http://ss64.com/nt/ That's the site I used to learn batch. Quote from: patio on January 19, 2014, 07:18:55 AM And Kudo's to you guys and the work you do here in the batch section...lemonilla you squash Salmon etc. etc....It took me over 15 minutes to figure out you didn't mean that I was squishing Salmon with something... Quote from: Lemonilla on January 19, 2014, 02:42:18 PM It took me over 15 minutes to figure out you didn't mean that I was squishing Salmon with something... With what might you have been squishing me? (Do I want to know?) You can learn a lot by participating in forums like these. Read the threads and learn from them and eventually you will be answering questions instead of asking questions. Dostips.com also has plenty of tutorials as well. |
|