Search found 9 matches
- 26 Feb 2017 20:34
- Forum: DOS Batch Forum
- Topic: How to test if DNS is up (home setup) -- nslookup...?
- Replies: 4
- Views: 5495
Re: How to test if DNS is up (home setup) -- nslookup...?
Why not use? ipconfig /flushdns Well, the script is going to be repeating the test every 20 seconds or so. It's designed to be run in the background while the user is still using the PC, so I thought that it might not be "best practice" to just wipe the DNS cache so frequently. But why no...
- 25 Feb 2017 22:05
- Forum: DOS Batch Forum
- Topic: How to test if DNS is up (home setup) -- nslookup...?
- Replies: 4
- Views: 5495
How to test if DNS is up (home setup) -- nslookup...?
I'm writing a fun little script to test internet connectivity for home users of normal ISPs. So far I've been using the ping command to ping a domain name, and if it succeeds, I assume that DNS is working. But I've realised that this might just use the local machine's DNS cache without actually test...
- 14 Feb 2017 13:08
- Forum: DOS Batch Forum
- Topic: Can anyone explain this ONE line of code? (ipconfig text into variables)
- Replies: 4
- Views: 5528
Re: Can anyone explain this ONE line of code? (ipconfig text into variables)
Excellent! Thanks for the links and explanation. I'll have a proper read through and another play around. That's just the kind of stuff I wanted to know! One quick question... I saw that there are some functions (code snippets) on this site. One is a function called :getIPConfig , which puts IPCONFI...
- 14 Feb 2017 10:04
- Forum: DOS Batch Forum
- Topic: Can anyone explain this ONE line of code? (ipconfig text into variables)
- Replies: 4
- Views: 5528
Can anyone explain this ONE line of code? (ipconfig text into variables)
Hi. I've written some very simple batch files, but I'm a bit of a newbie. I want to run "ipconfig", and put the gateway IP address into a variable. I found this solution on another forum: set "ip=" for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "Default"...
- 10 Feb 2017 07:27
- Forum: DOS Batch Forum
- Topic: Box-drawing characters in batch files...?
- Replies: 25
- Views: 53694
Re: Box-drawing characters in batch files...?
Hmm. I'm afraid you didn't fully understand. and use the equivalent characters (accented E, etc.) This isn't portable. See the difference between Antonio's and Saso's examples. Both are able to write box-drawing characters for their specific computer settings. As I wrote, as soon as you have charac...
- 09 Feb 2017 12:52
- Forum: DOS Batch Forum
- Topic: Box-drawing characters in batch files...?
- Replies: 25
- Views: 53694
Re: Box-drawing characters in batch files...?
aGerman wrote:miskox wrote:(but your example does not work for me)
That's interesting. There are two possible reasons:
1) Code page 439 is not supported on your PC.
So... a computer won't necessarily support all valid code pages...? Is the only reliable solution to stick to pure ASCII characters?
- 09 Feb 2017 11:18
- Forum: DOS Batch Forum
- Topic: Box-drawing characters in batch files...?
- Replies: 25
- Views: 53694
Re: Box-drawing characters in batch files...?
Amazing! Thank you all for your help! I think I'm starting to understand now... Notepad++ has encoded the batch file in UTF-8 format without a BOM, which is why the box characters in it are preserved when the file is saved and reopened. And, although the console requires batch files to be in single-...
- 05 Feb 2017 22:15
- Forum: DOS Batch Forum
- Topic: Box-drawing characters in batch files...?
- Replies: 25
- Views: 53694
Re: Box-drawing characters in batch files...?
Wow! Thank you all for your incredibly helpful replies! I'll have another play around to see if I can work out the best way to do this. One thing I don't understand... is how Notepad++ uses UTF-8 encoding to save the batch file and it works fine, yet a batch file saved with UTF-8 in Notepad doesn't ...
- 04 Feb 2017 22:34
- Forum: DOS Batch Forum
- Topic: Box-drawing characters in batch files...?
- Replies: 25
- Views: 53694
Box-drawing characters in batch files...?
Hi all! I'm using the "echo" command to write text both on-screen and to a text file. For aesthetic reasons, I now want to use box-characters like the ones shown at the top of the fourth column here: m If I copy and paste them into Notepad and try to save the file, I get a message warning ...