Search found 3822 matches

by Squashman
20 Sep 2018 07:00
Forum: DOS Batch Forum
Topic: Nagios Host creator, .txt manipulator
Replies: 1
Views: 45

Re: Nagios Host creator, .txt manipulator

@echo off (FOR /F "TOKENS=1,2 DELIMS=," %%G IN (input.txt) DO ( echo define host{ echo use pos_mgr_template ; Inherit default values from a template echo host_name %%G ; The name we're giving to this host echo alias %%GCAFE ; A longer name associated with the host echo address %%H ; IP address of t...
by Squashman
18 Sep 2018 14:21
Forum: DOS Batch Forum
Topic: JREPL.BAT v7.13 - regex text processor now with Unicode and XRegExp support
Replies: 380
Views: 125999

Re: JREPL.BAT v7.13 - regex text processor now with Unicode and XRegExp support

Hi dbenham, Thank you very much for writing and maintaining this script. Within the context of a cmd.exe in Windows 10, I'm calling a batch script which then invokes an exe to do a C++ build. I want to modify the output to the cmd prompt to color warnings in yellow and errors in red. This seems lik...
by Squashman
13 Sep 2018 10:50
Forum: DOS Batch Forum
Topic: Show date in order I want it to
Replies: 4
Views: 100

Re: Show date in order I want it to

If you want the date in a different order then substring the date variable just like you are doing with the time variable.
by Squashman
07 Sep 2018 12:14
Forum: DOS Batch Forum
Topic: Copy Files with Same Extension from Subfolders
Replies: 2
Views: 87

Re: Copy Files with Same Extension from Subfolders

I am trying to create a batch file to copy files of one extension type from numerous subfolders to a different folder. I am using this command: xcopy *.mp3 destination /s It isolates the files and copies the files, but creates the subfolders too. Is there another option that would place the files i...
by Squashman
06 Sep 2018 07:01
Forum: DOS Batch Forum
Topic: Refresh Desktop (Powershell hybrid)
Replies: 6
Views: 195

Re: Refresh Desktop (Powershell hybrid)

ShadowThief wrote:
05 Sep 2018 22:36
Squashman wrote:
05 Sep 2018 18:17
I am not a .net programmer but didn't someone show an example of creating and compiling quick and dirty .net code. Not sure if that would be faster.
You mean viewtopic.php?t=4762#p27555?
This one viewtopic.php?t=5260
by Squashman
05 Sep 2018 18:17
Forum: DOS Batch Forum
Topic: Refresh Desktop (Powershell hybrid)
Replies: 6
Views: 195

Re: Refresh Desktop (Powershell hybrid)

I am not a .net programmer but didn't someone show an example of creating and compiling quick and dirty .net code. Not sure if that would be faster.
by Squashman
05 Sep 2018 18:14
Forum: DOS Batch Forum
Topic: Help can JREPL do this?
Replies: 10
Views: 167

Re: Help can JREPL do this?

Damn it nope. Seems it still fails after the loop. I get this error now: http://prntscr.com/kr3gu3 IMHO, it would be easier to copy and paste the text from the console window then creating a screenshot and creating a link for it. Also you should be able to do everything you need to do without JREPL...
by Squashman
05 Sep 2018 09:19
Forum: DOS Batch Forum
Topic: Help can JREPL do this?
Replies: 10
Views: 167

Re: Help can JREPL do this?

In the future may I suggest you provide a verifiable example of what the input of your example is and what you want to the output to look like. A wordy description can sometimes gets confusing without seeing a real world example of your data.
by Squashman
03 Sep 2018 20:42
Forum: DOS Batch Forum
Topic: more tricks with certutil
Replies: 9
Views: 688

Re: more tricks with certutil

CERTUTIL has a surprisingly low limit to the size file it can encode/decode. I'm not sure about the exact value, but the encode limit is only in the tens of millions range. Through trial and error, I've determined that the limit is 74472684 bytes. I'm guessing that there's an output file size thres...
by Squashman
28 Aug 2018 13:49
Forum: DOS Batch Forum
Topic: copy newer files to specific folder
Replies: 2
Views: 102

Re: copy newer files to specific folder

chrisb421 wrote:
28 Aug 2018 13:15
i believe its a /D option I need to put in somewhere, but i don't know where.
That would be true if you were using XCOPY.

The /D option of the COPY command does something completely different. Helps if you read the help files.
by Squashman
28 Aug 2018 11:41
Forum: DOS Batch Forum
Topic: echo text %% [SOLVED]
Replies: 2
Views: 123

Re: echo text %%

Double the percent symbols.

Code: Select all

echo for /l %%%%w in (1,1,20) do mode con:cols=67 lines=%%%%w>mybat.bat
by Squashman
22 Aug 2018 16:45
Forum: DOS Batch Forum
Topic: Deleting specific lines from a text file
Replies: 6
Views: 290

Re: Deleting specific lines from a text file

goodywp wrote:
22 Aug 2018 15:16
since /X Print lines that match exactly.
So what is the next logical step to test in your code?

You also asked this same question last month.
viewtopic.php?t=8727
by Squashman
21 Aug 2018 07:52
Forum: DOS Batch Forum
Topic: What does & mean?
Replies: 7
Views: 219

Re: What does & mean?

Allows you to stack multiple commands on one line.

For example

Code: Select all

echo Batch files are cool. & echo Batch files are fun.
versus

Code: Select all

echo Batch files are cool.
echo Batch files are fun.
by Squashman
16 Aug 2018 13:09
Forum: DOS Batch Forum
Topic: Get newest files from a text fie list
Replies: 3
Views: 158

Re: Get newest files from a text fie list

I think you mean the newest file from each respective base file name before the date.
by Squashman
15 Aug 2018 18:29
Forum: DOS Batch Forum
Topic: need help in adding a word at the end of all files
Replies: 3
Views: 139

Re: need help in adding a word at the end of all files

You have been shown in your previous questions how to separate the file name from the file extension. Please do a little research of your own before asking questions.