Search found 4315 matches

by Squashman
13 Jan 2012 08:36
Forum: DOS Batch Forum
Topic: TASKLIST
Replies: 3
Views: 4111

Re: TASKLIST

Definitely have 3 processes. Was going to post the output of TASKLIST to show you that the Window Title was blank for the other processes but figured that was understood. The only real way to identify which process is for which Window is to use the Window Title option.
by Squashman
12 Jan 2012 17:11
Forum: DOS Batch Forum
Topic: TASKLIST
Replies: 3
Views: 4111

TASKLIST

This is really irritating with with the way TASKLIST outputs the Window Title for Internet Explorer 8 on Windows 7 and this goes hand in hand with TASKKILL. I have 3 instances of Internet Explorer Open (not tabs), each on a different website. When I run the TASKLIST command, the Window Title is only...
by Squashman
11 Jan 2012 16:59
Forum: DOS Batch Forum
Topic: schtasks - checking for shutdown.exe and overwrite
Replies: 15
Views: 16900

Re: schtasks - checking for shutdown.exe and overwrite

mrrhtuner wrote:Now to figure out the loop process of it

Not understanding why you think you need another loop?
by Squashman
11 Jan 2012 16:56
Forum: DOS Batch Forum
Topic: schtasks - checking for shutdown.exe and overwrite
Replies: 15
Views: 16900

Re: schtasks - checking for shutdown.exe and overwrite

I finally understood what you meant by "OverWrite". It wasn't making any sense to me until you mentioned the /F switch with the delete option. I can see how you would think you are overwriting a task but you really are not. You are deleting an existing task and creating a whole new one. Yo...
by Squashman
11 Jan 2012 08:01
Forum: DOS Batch Forum
Topic: IF STATEMENT DOESNT RUN
Replies: 3
Views: 4105

Re: IF STATEMENT DOESNT RUN

Just a notice for the original poster, TIMEOUT and CHOICE are not native to Windows XP. You may have issues running the script Cat posted. Those commands are available on Vista and Windows 7.
by Squashman
11 Jan 2012 07:55
Forum: DOS Batch Forum
Topic: schtasks - checking for shutdown.exe and overwrite
Replies: 15
Views: 16900

Re: schtasks - checking for shutdown.exe and overwrite

Findstr is case sensitive. Shutdown.exe is not the same as shutdown.exe You need to add the /I switch to the findstr command. While you could change the existing task with the /CHANGE option I don't think this would be as good of an approach as deleting what is there and then adding what you want. T...
by Squashman
10 Jan 2012 18:43
Forum: DOS Batch Forum
Topic: schtasks - checking for shutdown.exe and overwrite
Replies: 15
Views: 16900

Re: schtasks - checking for shutdown.exe and overwrite

It would help to post the code you are using if you changed the original code I gave you.
by Squashman
10 Jan 2012 12:50
Forum: DOS Batch Forum
Topic: Verify a string exists within another string?
Replies: 9
Views: 8625

Re: Verify a string exists within another string?

The FINDSTR search is case sensitive by default. Since you probably don't want to see the FINDSTR output, you might want to redirect the output to nul: echo %str%|findstr /c:"-verbose" >nul Dave Benham That is one of things I like about this forum. The attention to detail everyone has wit...
by Squashman
10 Jan 2012 12:17
Forum: DOS Batch Forum
Topic: Verify a string exists within another string?
Replies: 9
Views: 8625

Re: Verify a string exists within another string?

Love Dave's code with the String replacement. But yes in theory you could use Findstr and look at the errorlevel. E:\batch files>set "str=-debug -verbose -normi -homedir -repo" E:\batch files>echo %str% | findstr /c:"-verbose" -debug -verbose -normi -homedir -repo E:\batch files>...
by Squashman
10 Jan 2012 10:23
Forum: DOS Batch Forum
Topic: Determining the number of lines in a file.
Replies: 50
Views: 42388

Re: Determining the number of lines in a file.

Thanks Ed. That worked. Didn't realize I needed to assign that variable to another variable before the ENDLOCAL. Delayed Expansion was enabled higher up in the script.
by Squashman
10 Jan 2012 10:07
Forum: DOS Batch Forum
Topic: Game help,if player has money smaller than cost of something
Replies: 4
Views: 4386

Re: Game help,if player has money smaller than cost of somet

Does your MONEY variable have a currency symbol in it or not? If it does you need to remove it from the variable in order to compare the two values. I am no math major but I am pretty sure 50 is not the same as 500. IF %Money% LSS 50 Echo You dont have enough money to buy this item. And IF this stat...
by Squashman
09 Jan 2012 18:09
Forum: DOS Batch Forum
Topic: Determining the number of lines in a file.
Replies: 50
Views: 42388

Re: Determining the number of lines in a file.

I was thinking about making this post a separate thread but since it is going to be integrated into this one script I am just going to post it here. As I said in my last post I am going to use Judago's Divide.bat to calculate the number of lines because we may run into file sizes that are larger tha...
by Squashman
09 Jan 2012 14:47
Forum: DOS Batch Forum
Topic: schtasks - checking for shutdown.exe and overwrite
Replies: 15
Views: 16900

Re: schtasks - checking for shutdown.exe and overwrite

I believe this would work.

Code: Select all

for /f "skip=1 tokens=2 delims=," %%F in ('schtasks /query /v /FO CSV ^|findstr "shutdown.exe"') do schtasks /delete /TN %%F
by Squashman
09 Jan 2012 14:34
Forum: DOS Batch Forum
Topic: schtasks - checking for shutdown.exe and overwrite
Replies: 15
Views: 16900

Re: schtasks - checking for shutdown.exe and overwrite

Use the Query option and pipe it to the findstr command.

schtasks /query /V /FO CSV | findstr "shutdown.exe"

Can probably put that into a for loop to get the correct token as well.
by Squashman
08 Jan 2012 13:46
Forum: DOS Batch Forum
Topic: 2 pushd one for temp and one for location where file is
Replies: 4
Views: 4395

Re: 2 pushd one for temp and one for location where file is

What do you mean you won't know. You just echoed the output to whatever directory is assigned to the temp variable because you did the pushd first so use the temp variable with the set statement. Set /p nick=<%temp%\nick.db Word of advice to you. Make sure you close up the spaces when you are using ...