Thanks,
Need for speed is given by the length of the files....
I can't just match on the IP, it needs to be ",%ip%," as parameter for the find to get the matching done right, otherwise .1 matches .1, .10-10 and 100-199
Cheers,
Search found 8 matches
- 02 Mar 2012 00:50
- Forum: DOS Batch Forum
- Topic: need to work variables blocked by delayedexpansion (I think)
- Replies: 5
- Views: 5582
- 01 Mar 2012 06:05
- Forum: DOS Batch Forum
- Topic: need to work variables blocked by delayedexpansion (I think)
- Replies: 5
- Views: 5582
Re: need to work variables blocked by delayedexpansion (I th
The output format should be like this. 00-23-70-eb-53-15,Person U,Location a I solved my problem by doing the conversion of the mac address in a function. Maybe/probably this is not optimal. @echo off setlocal enabledelayedexpansion REM set name of source files set ipname=ip.csv set macip=sh_arp.txt...
- 29 Feb 2012 08:29
- Forum: DOS Batch Forum
- Topic: need to work variables blocked by delayedexpansion (I think)
- Replies: 5
- Views: 5582
need to work variables blocked by delayedexpansion (I think)
I need to combine 2 files into one new one based on a common part, the IP address. file1 : iplist.txt "10.10.1.52","Person U","Location a" "10.10.1.53","Person Q","Location a" "10.10.1.54","Person X","Location b&quo...
- 05 Jan 2012 00:57
- Forum: DOS Batch Forum
- Topic: A dos version of unix which command
- Replies: 13
- Views: 14203
Re: A dos version of unix which command
Not sure why I did that first set statement. You can do the string replacement in the FOR LOOP. Never worry about that. I made a 60 line perl script for a customer about 2 years ago. Some consultant said it was crap and replaced it by a 10 line version, doing the same. Yesterday I found they reused...
- 05 Jan 2012 00:44
- Forum: DOS Batch Forum
- Topic: A dos version of unix which command
- Replies: 13
- Views: 14203
Re: A dos version of unix which command
Thanks everybody, This site really is a place to get answers The idea is indeed to get the location of the first matching executable. Having said that, I am actually often interested in what 'else' is there, and where. That would show, as usual, that someone installed or upgraded something, putting ...
- 03 Jan 2012 10:17
- Forum: DOS Batch Forum
- Topic: A dos version of unix which command
- Replies: 13
- Views: 14203
A dos version of unix which command
I often find myself using a different perl.exe of java.exe then I intended to use. This made me look if there was a dos replacement of the unix which command. For those unaware of this command, which perl , would simply find the first perl in the PATH. In that sense it is also a nice tool to see if ...
- 03 Jan 2012 01:22
- Forum: DOS Batch Forum
- Topic: Detect if batchfile is launched from explorer or dosprompt
- Replies: 7
- Views: 11207
Re: Detect if batchfile is launched from explorer or dosprom
Thank you very much for all replies. My motivation for this batch is sheer laziness. I don't want to hit any key to end the script when I run it from the prompt while still adding the pause statement for my colleagues running it from a short-cut. @aGerman I will be chewing on the code you provided t...
- 02 Jan 2012 02:42
- Forum: DOS Batch Forum
- Topic: Detect if batchfile is launched from explorer or dosprompt
- Replies: 7
- Views: 11207
Detect if batchfile is launched from explorer or dosprompt
Best Wishes for 2012 to you all. I'm posting this here because I already got a lot of useful information from this site. This however, I found somewhere, else and thought other people may be looking for a similar solution. I've created some batch-files that display various types of info and received...