He builds his castles in the air, from air, creating by exertion of the imagination. Doesn't anyone have a sense of humour around here? I know BigTeddy does. Humour is subjective. When you did this: gc test. To see the members of the array itself, you need to do a get-member on it directly, not through the pipeline: gm -inputobject gc test. Now mj you know I am not going to let you get away with that and her is why Look again at teh original statemnent: Edit: jv, How did you know to use.
Count The variable is still created but it is not dsiplayed and it will not be sent to the console because I have asked to to be acted on by teh dot operato to give me only the count of items. Jsut doing GM on the file result gers only the first element of [string[]] string array Now try these two: "hello". Hi mjolinor, It's probably best not to feed the trolls : Bill. We should probably take this elsewhere.
Moderator's Forum? Can I just remind you of the opening question: "How can I count the number of lines using a batch file? No, no, mjolinor, your explanation was clear and understandable, and I thank you for it. If it answered your question, remember to mark it as an "Answer".
IMHO: the forums are an exercise in peer review and cooperative programming and debugging. You address the code, you don't go after the coder. Review the threads. Nobody here goes after people the way you do. Was this because I posted 'awesome' when BigTeddy said he loved being wrong? If it was then don't stress the flex man I love being wrong as well.
It's the only way to learn anything around here here being in the real world pointing about at real people sitting about me.
It's awesome someone else thinks the same way. Anyway I've taken this off topic Hi Derek, This thread has been a thrilling ride from "How to count lines in a text file" to what really set things alight, which was jv's statement: "Now mj you know I am not going to let you get away with that and her is why". If you found this post helpful, please give it a "Helpful" vote. I will delete that post.
Hi mjolinor, Yes. Please see my post there. Previous Post Previous Guiding Hands. Next Post Next Want to drive in Lebanon? I have the perfect car for you! Loading Comments Email Required Name Required Website. FixitUP Posted January 13, Posted January 13, Nice coding. How would I get it to exit instead of continue? You may find the following fun! On Windows 7 they have a exe called Timeout Description: This utility accepts a timeout parameter to w time period in seconds or until any key is accepts a parameter to ignore the key press.
On Windows 7 they have a exe called Timeout. AceInfinity Posted February 3, Posted February 3, Here's a wait animation I wrote a while back, Only it's not based on a countdown:. Posted June 27, Since this is a older thread and the original poster requested Cmd with countdown, I just recently wrote this VBS script that has a countdown and you can cancel the countdown.
Posted October 26, Find centralized, trusted content and collaborate around the technologies you use most. Connect and share knowledge within a single location that is structured and easy to search. I'm trying to make a Batch file that will increment a variable by 1 each time it loops, and then check if the variable is equal to 5, and if it isn't, it loops again. I know there's probably a while loop for this, but I didn't know how to do that, and I'm just enjoying learning Batch for fun right now.
Here's the code, it doesn't work the way it should, it just displays a 0: and then does nothing else. So how would I go about fixing it? I have a feeling I'm setting and incrementing the variable wrong, and maybe it's confused about the 2 if statements?
Does it have an else if? Anyways, thanks for the help. Note: I don't know a lot of Batch and I'm not a pro, but I like to learn and I'm just doing this for future reference, and because I enjoy it. So, this code probably isn't good, but I want to know how I can accomplish this. This is a way to simulate the while loop you are trying to accomplish.
Only one goto is needed:. Third, check the syntax of the if expression! Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
0コメント