Search found 3970 matches

by Squashman
23 Mar 2019 08:06
Forum: DOS Batch Forum
Topic: Problem with correctly quoting in a FOR /F loop
Replies: 7
Views: 1161

Re: Problem with correctly quoting in a FOR /F loop

jwoegerbauer wrote:
23 Mar 2019 00:29
Thanks for your inputs, guys. To keep you updated: None of the proposed solutions were effective. Have a nice day.
Care to give us any valuable feedback?

Dave, I always thought if the code had single quotes that the USEBACKQ option was needed with the FOR /F???
by Squashman
23 Mar 2019 07:59
Forum: DOS Batch Forum
Topic: CONVERTCP.exe - Convert text from one code page to another
Replies: 85
Views: 42256

Re: CONVERTCP.exe - Convert text from one code page to another

aGerman wrote:
22 Mar 2019 10:44
Curiously there is no on-board tool for Windows like iconv for *nixoid systems.
I wonder if it comes with the Linux subsytem for Windows 10? I have yet to install and try it.
by Squashman
20 Mar 2019 22:00
Forum: DOS Batch Forum
Topic: Get folder size to continue
Replies: 13
Views: 2072

Re: Get folder size to continue

Now the folder size is being chosen. Yet we are back to this once I take the echo out and try and make the torrents.' https://i.imgur.com/bdTyqtR.png You know you can copy and paste text from the console. That is much quicker then making a screen shot and consumes much less resources on the server ...
by Squashman
19 Mar 2019 15:01
Forum: DOS Batch Forum
Topic: JREN.BAT v2.8 - Rename files/folders using regular expressions
Replies: 56
Views: 37954

Re: JREN.BAT v2.8 - Rename files/folders using regular expressions

Pretty sure you don't need JREPL for this task. Regardless of that your input file name is not matching your output file name. Could you please provide multiple file name examples as well.
by Squashman
18 Mar 2019 20:26
Forum: DOS Batch Forum
Topic: Lag methodology
Replies: 9
Views: 1641

Re: Lag methodology

Come on. You have been a member long enough to make an attempt!

viewtopic.php?t=5051
by Squashman
18 Mar 2019 15:33
Forum: DOS Batch Forum
Topic: Modify a .txt file with a batch file (without a text editor)
Replies: 3
Views: 788

Re: Modify a .txt file with a batch file (without a text editor)

How about you start with learning how to read a file using the FOR /F command. Then learn how to change the contents of a variable with the set command. Both of these commands have extensive help file documentation. Once you have mastered those two techniques individually you should be able to under...
by Squashman
18 Mar 2019 12:07
Forum: DOS Batch Forum
Topic: Modify a .txt file with a batch file (without a text editor)
Replies: 3
Views: 788

Re: Modify a .txt file with a batch file (without a text editor)

There is no three and four in your example. All writing is done with redirecting Standard output to a file using the > symbol. Since Windows does not come with a stream editor you will need to use a FOR /F command to read the file and the SET command to do string substitution. Do a little research o...
by Squashman
16 Mar 2019 13:53
Forum: DOS Batch Forum
Topic: batch to overwrite files in all subdirectories in one folder if their names match with files in another folder
Replies: 10
Views: 1390

Re: batch to overwrite files in all subdirectories in one folder if their names match with files in another folder

Try to explain things in a logical order. Source is usually listed first and would be referred to as folder one or folder A. The destination is normally listed second and would be referred to as folder two or folder B.
by Squashman
14 Mar 2019 21:25
Forum: DOS Batch Forum
Topic: Lag methodology
Replies: 9
Views: 1641

Re: Lag methodology

Lots of examples of Date math on the forum. PowerShell is another good option because you can easily set the output format. You can even use XCOPY to help with date math.
by Squashman
14 Mar 2019 21:14
Forum: DOS Batch Forum
Topic: Syntax Problem - moving files in subdirs with white space in filename
Replies: 5
Views: 860

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

Code: Select all

for /R "E:\photos" %%i in ("* 19*.jpg") do move "%%i"  "E:\your destination folder\"
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: 860

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

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

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

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

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