Search found 3990 matches

by Squashman
14 Mar 2019 18:11
Forum: DOS Batch Forum
Topic: Syntax Problem - moving files in subdirs with white space in filename
Replies: 5
Views: 1222

Re: Syntax Problem - moving files in subdirs with white space in filename

Code: Select all

for %%i in ("E:\photos\* 19*.jpg") do move "%%i"  "E:\your destination folder\"
by Squashman
13 Mar 2019 19:56
Forum: DOS Batch Forum
Topic: Can I compare data using a command when using side by side function
Replies: 5
Views: 1345

Re: Can I compare data using a command when using side by side function

No. Pretty sure we have told you that batch files cannot interact with graphical user interface programs.
by Squashman
12 Mar 2019 08:01
Forum: DOS Batch Forum
Topic: Setting a variable value to single whitespace
Replies: 6
Views: 1440

Re: Setting a variable value to single whitespace

You do not use variable expansion with the IF DEFINED command.
by Squashman
11 Mar 2019 15:34
Forum: DOS Batch Forum
Topic: Get PID from port
Replies: 5
Views: 1389

Re: Get PID from port

You used it correctly in previous questions you have asked on the forums.

Eighth line of the help file for the FOR command.
To use the FOR command in a batch program, specify %%variable instead
of %variable. Variable names are case sensitive, so %i is different
from %I.
by Squashman
10 Mar 2019 13:22
Forum: DOS Batch Forum
Topic: How to substitute a variable
Replies: 2
Views: 828

Re: How to substitute a variable

Do not put spaces on either side of the equals symbol. If a space is on the left of the equals symbol it becomes part of the variable name: %var %. If it is on the right it becomes part of the value. Also do not assign quotes to variables but do you use them to protect special characters and from tr...
by Squashman
08 Mar 2019 10:28
Forum: DOS Batch Forum
Topic: Find a String
Replies: 9
Views: 1889

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: 1889

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: 904

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: 1104

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: 681

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: 1925

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: 4423

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: 4423

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: 4423

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: 1836

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...