Search found 54 matches

by Matt20687
08 May 2012 03:49
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

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. I do too. You can use something like c:\util and in Windows control panel > system you can ch...
by Matt20687
06 May 2012 14:57
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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 Matt20687
06 May 2012 14:18
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12527

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

It seems so Squashman. Your first code snippet will work @echo off for /f "delims=" %%G in (ID.csv) do ( start "" chrome.exe "http://WEBSITE=%prefix%-%%G&op=exams" ) @Matt20687 The file ID.csv file above can be called anything, like file.txt but it needs to have a ...
by Matt20687
06 May 2012 14:02
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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 Matt20687
06 May 2012 08:41
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12527

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

Squashman wrote:So it is a PIPE delimited file not a COMMA delimited file?


The pipes are just breaking the row numbers with the actual numbers data. The ids are held in column a and in this example are in rows 1, 2, 3 & 4. The second example foxi gave above.
by Matt20687
06 May 2012 00:09
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12527

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. The layout is: A 1| DF5488 2|4777858 3| 3201V 4...
by Matt20687
05 May 2012 16:59
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

Batch cannot access Web content directly. You will need a 3rd party tool to capture the content into a file. I've never done this type of thing, but Gnu wget seems to be the most popular. While you are at it, you can download sed as well. You can much more easily be precise with your file processin...
by Matt20687
05 May 2012 16:56
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12527

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

It still is doing the same thing foxidrive. My code is: set /p uid=<unreportid.csv for /f "tokens=1-4 delims=," %%a in (unreportid.csv) do ( start "" chrome.exe "http://WEBSITE=%prefix%-%uid%&old_patient_id=%prefix%-%uid%&op=exams" start "" chrome.exe...
by Matt20687
05 May 2012 16:07
Forum: DOS Batch Forum
Topic: Batch File - Can you search a .csv and paste ??
Replies: 24
Views: 12527

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

Hello, I am tearing my hair out over this!! Cannot figure out why it will read all of the entries but not copy/paste any but the first one! Is there anything anyone can suggest as its holding my whole project up now, i will keep looking but i have been trying to sort it for hours now so not too full...
by Matt20687
05 May 2012 15:50
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

Thanks for that, it makes sense!! I am downloading it now. One last question (I HOPE!) What would the variable be for the end of the web addy below. This is the one that needs the sps_id at the end. start chrome.exe "http://Website?http://ims/booking.php?patient_id=%prefix%-%uid%&old_patien...
by Matt20687
05 May 2012 14:04
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

P.S. I tried your script on its own with html copied and pasted into a notepad. Outputs the correct number everytime!!! There has to something wrong with my code. I believe it is the following bit, i have just found it is refusing to open the page set searchStr=^^^"');\"><td>%uacc%" f...
by Matt20687
05 May 2012 13:40
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

hello, thanks for clearing this up. I have got closer now, the search function isnt working quite right. It isnt returning the 7 digit number, instead its returning &SPS_ID. Any reason why this is? My code is below :next set /p uacc=<unreportacc.csv set searchStr=^^^"');\"><td>%uacc%&q...
by Matt20687
05 May 2012 10:13
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

I am really struggling with this one. Can someone explain this code for me so i can try and understand what is going on as i still cannot get it to work! I am confused with the different variables and what they are actually referring to set "ln=!ln:*&sps_id=!" set "sps_id=!ln:~1,7...
by Matt20687
05 May 2012 09:54
Forum: DOS Batch Forum
Topic: Searching html? Can a batch file do this?
Replies: 38
Views: 20911

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

Thanks for this Dave, looks good.

In your example you have the findstr looks at a file rather than a web page. Is this possible?
by Matt20687
05 May 2012 06:14
Forum: DOS Batch Forum
Topic: Timed bach file
Replies: 1
Views: 1907

Re: Timed bach file

Hello,

Why not try

@echo off

start filename.exe
ping localhost -n 300 > nul
taskkill /F /IM filename.exe

pause>nul