Search found 3970 matches

by Squashman
08 Mar 2019 10:28
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 1278

Re: Find a String

testingbatch wrote:
08 Mar 2019 10:23
The main goal is to find the 4 strings only about when the request is finished (ignore the 4 lines about the start).
You don't want the date and time stamp?
by Squashman
08 Mar 2019 10:01
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 1278

Re: Find a String

You need to show us a full example of the log file.
testingbatch wrote:
08 Mar 2019 08:42
That's why i asked if using a For would be a better option.
You never asked this in your original question.
by Squashman
07 Mar 2019 12:26
Forum: DOS Batch Forum
Topic: nested for loop not working as hoped
Replies: 2
Views: 613

Re: nested for loop not working as hoped

Your second for command is trying to execute a command because you are using the /F option and using single quotes within the in clause. You don't have a valid command within the in clause. Just remove the /F option and change the single quotes to double quotes which will execute a standard FOR comm...
by Squashman
04 Mar 2019 15:38
Forum: DOS Batch Forum
Topic: read a line from a txt file into a var , looping f.md5
Replies: 2
Views: 584

Re: read a line from a txt file into a var , looping f.md5

You are inside a parentheses code block. All environmental variables inside a code block are expanded to their values before any commands are executed. In order to have the environmental variables expanded at run time of the command, you need to use delayed expansion.
by Squashman
04 Mar 2019 15:31
Forum: DOS Batch Forum
Topic: How to close cmd window?
Replies: 1
Views: 460

Re: How to close cmd window?

The ampersand is a special character that concatenates two commands onto one line. Not sure why you think you need it in your code.

Code: Select all

start "" notepad.exe
start "" mspaint.exe
by Squashman
28 Feb 2019 18:06
Forum: DOS Batch Forum
Topic: How to eliminate the spaces in a line in a text file
Replies: 9
Views: 1311

Re: How to eliminate the spaces in a line in a text file

And what is the output supposed to look like?
by Squashman
22 Feb 2019 18:45
Forum: DOS Batch Forum
Topic: newbie min cmd window?
Replies: 19
Views: 2458

Re: newbie min cmd window?

But I thought the problem was you didn't want the cmd window open in the background. I don't see how this solves that.
by Squashman
22 Feb 2019 15:59
Forum: DOS Batch Forum
Topic: newbie min cmd window?
Replies: 19
Views: 2458

Re: newbie min cmd window?

I am not going to make assumptions on what code you are using to accomplish your task. It is pointless to ask a question if you haven't already tried some code to solve the task. Try to code it yourself. If it doesn't work, come back and post the code you are trying to use and explain in full detail...
by Squashman
22 Feb 2019 13:08
Forum: DOS Batch Forum
Topic: newbie min cmd window?
Replies: 19
Views: 2458

Re: newbie min cmd window?

Code: Select all

@echo off
start "My Game" "E:\12noon Display Changer\dc64.exe" -width=1176 -height=664 /c "E:\LaunchBox\Games\Big Fish Games\Mystery Case Files - Return to Ravenhearst FINAL\ReturnToRavenhearst.exe"
by Squashman
22 Feb 2019 12:35
Forum: DOS Batch Forum
Topic: Windows 10 Startup Loop CMD Regback backup
Replies: 7
Views: 1019

Re: Windows 10 Startup Loop CMD Regback backup

When Windows Vista was released, Microsoft came up with a much improved backup utility built-in to the operating system. Now granted there was NTBackup in the past but the new one is practically effortless as far as setting up the backups and restoring them. I would highly advise you look into usin...
by Squashman
22 Feb 2019 11:58
Forum: DOS Batch Forum
Topic: Windows 10 Startup Loop CMD Regback backup
Replies: 7
Views: 1019

Re: Windows 10 Startup Loop CMD Regback backup

When Windows Vista was released, Microsoft came up with a much improved backup utility built-in to the operating system. Now granted there was NTBackup in the past but the new one is practically effortless as far as setting up the backups and restoring them. I would highly advise you look into using...
by Squashman
19 Feb 2019 11:37
Forum: DOS Batch Forum
Topic: was unexpected at this time
Replies: 3
Views: 722

Re: was unexpected at this time

Remove the spaces in the SET command for the JOBID variable. If you have a space on the left of the equals symbol it becomes part of the variable name. If you have a space on the right of the equals symbol it becomes part of the value.
by Squashman
18 Feb 2019 09:00
Forum: DOS Batch Forum
Topic: Unable to set correct parameters in for loop
Replies: 1
Views: 471

Re: Unable to set correct parameters in for loop

There is absolutely no need for the count2 variable. You can just use the FOR loop variable. Currently you are just assigning a string to the variable. I assume you want the value of the array variable. No need to assign it to another environmental variable either. Just use it directly in your next ...
by Squashman
17 Feb 2019 10:48
Forum: DOS Batch Forum
Topic: First read from file always fails
Replies: 3
Views: 699

Re: First read from file always fails

Environmental variables that are created and need to be referenced in a parentheses code block need to use delayed expansion.

Code: Select all

@echo off
setlocal enabledelayedexpansion
for /F %%A in (C:\Users\user1\Desktop\IP.txt) do (
	set F=%%A
	echo !F!
)
by Squashman
15 Feb 2019 14:42
Forum: DOS Batch Forum
Topic: Get notified when public facing IP changes
Replies: 9
Views: 1418

Re: Get notified when public facing IP changes

I wouldn't be hammering someone's website every minute. They will see that as abuse and try to block you.

Gonna assume you need a newer version of Powershell to run that cmdlet. Doesn't work on Powershell Version 2.