Search found 4315 matches

by Squashman
06 May 2012 15:48
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20895

Re: Searching html? Can a batch file do this?

Matt20687 wrote:Ah, I did not know that. What is the easiest option in your opinion

I chose to put all my 3rd party utilities into a specific folder and make sure that folder path exists in my PATH environmental variable.
by Squashman
06 May 2012 14:43
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20895

Re: Searching html? Can a batch file do this?

Did you even try the SED example I provided? I did go to the effort of testing it... EDIT: Oh, you think SED will use a web URL? No such luck. You will have to download the page using WGET, if you can, and then pass it to SED. foxidrive, i am having a problem with sed unfortunately. I have download...
by Squashman
06 May 2012 14:41
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12521

Re: Batch File - Can you search a .csv and paste ??

It seems you really don't understand how to use the variable from the FOR LOOP at all. If you want to use the Book Number from the file then use the LOOP Variable. This code: set bookingNumber=ACC.csv does nothing for you. A For /F loop parses an input file. As it is parsing each line it assigns it ...
by Squashman
06 May 2012 09:02
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12521

Re: Batch File - Can you search a .csv and paste ??

So you are just using a plain text file as your input with the ID's each on their own line.
by Squashman
06 May 2012 08:27
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12521

Re: Batch File - Can you search a .csv and paste ??

So it is a PIPE delimited file not a COMMA delimited file?
by Squashman
05 May 2012 17:46
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12521

Re: Batch File - Can you search a .csv and paste ??

Remember in my example when I told you %%G is the variable you need to use for the ID.

Are you putting all the ids on one line separated by a comma or is this a true csv file and the id is the first field in each line.

Could we see the id file please.
by Squashman
05 May 2012 07:48
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20895

Re: Searching html? Can a batch file do this?

You need to download a version of SED that works with the windows cmd shell.
Although batch might be able to do this SED is a much better alternative.
by Squashman
04 May 2012 16:58
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12521

Re: Batch File - Can you search a .csv and paste ??

This can be done with a csv file as well. So if the id is the first variable in your csv.

Code: Select all

for /f "tokens=1* delims=," %%G in (ID.csv) do (
Start chrome ......
)

%%G is the variable you use for the ID.
by Squashman
04 May 2012 07:08
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 9093

Re: Check for value

So you can take your DATA variable and assign it to another variable and manipulate it with string substitution. set admins=%data% Then to remove the known admins you could do this set admins=%admins:,adminpdc=% set admins=%admins:,administrator=% etc..... Once you have removed all the known admin u...
by Squashman
04 May 2012 06:40
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 9093

Re: Check for value

I created it with help from people of this forum a couple of years ago, so it's probably best to cleanup. Well I am not going to question aGerman's talents. His expertise are much better than mine. But you could have just resurrected your original thread instead of starting a new one. For everyone'...
by Squashman
04 May 2012 06:23
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 9093

Re: Check for value

OK, I see, and what about my question at the top. Is this possible you think? Sure, anything is possible. You could use string substitution to remove the known Users who are part of the administrators group. Then if the variable with all the users is still defined, then you know there is more users...
by Squashman
04 May 2012 06:02
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 9093

Re: Check for value

Open up a CMD shell and run your original for loop and just echo the results to the screen.
for /f "delims=" %a in ('net localgroup administrators') do echo %a

Now do this
for /f "skip=6 delims=" %a in ('net localgroup administrators') do echo %a

You see the difference.
by Squashman
04 May 2012 05:54
Forum: DOS Batch Forum
Topic: Check for value
Replies: 15
Views: 9093

Re: Check for value

Kind of wondering why you don't have your first FOR Loop using the SKIP option?
by Squashman
03 May 2012 19:43
Forum: DOS Batch Forum
Topic: how to display single letter from one word [solved]
Replies: 3
Views: 3568

Re: how to display single letter from one word [solved]

Like many programming languages counting starts from 0.
Position 0 = D
Position 1 = o
Position 2 = s
Etc