Search found 129 matches

by mirrormirror
01 Jul 2016 02:05
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2009409

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Hey guys, I'm cleaning up a couple of older batch scripts and wondered if I might be able to use jRepl or FindRepl to take some bulk out of them. Here are a couple of examples: 1. One routine parses the output from "ipconfig /all" to get the "DNS Servers". I guess there can be 1 ...
by mirrormirror
26 Mar 2016 15:05
Forum: DOS Batch Forum
Topic: Creating an archive batch with embed code
Replies: 3
Views: 4046

Re: Creating an archive batch with embed code

If I understand what you are looking for, users here have already developed several methods for doing this. If you read through this thread you'll see some of them: viewtopic.php?f=3&t=6983
by mirrormirror
14 Mar 2016 16:24
Forum: DOS Batch Forum
Topic: Script for Listing Shares
Replies: 6
Views: 5811

Re: Script for Listing Shares

Ok. Who are you supporting to cater for XP? I assumed it was for your own needs. There are 15 year old kids walking around who are older than XP. What, you aren't using XP??? Anyway, it is for my own use and this particular system is a no-frills box, thus no .net. The newer microsoft OS's are too i...
by mirrormirror
14 Mar 2016 00:06
Forum: DOS Batch Forum
Topic: Script for Listing Shares
Replies: 6
Views: 5811

Re: Script for Listing Shares

A module exists here, including for XP, using powershell to ease file permissions and security.

Thanks for the link but unfortunately, the XP environment doesn't have .net installed so I don't think powershell is an option.
by mirrormirror
12 Mar 2016 19:29
Forum: DOS Batch Forum
Topic: Preventing script collisions: allow only one instance per %1
Replies: 11
Views: 12153

Re: Preventing script collisions: allow only one instance per %1

As you noted, it appears to signify standard output redirection. Some programs mentioned here may help to further check that output. Thanks for the link- interesting reading. So I guess numbers " 4-9 " could be used? And are the contents of this file: "..\logs\name_%date:/=-%%time::=...
by mirrormirror
12 Mar 2016 19:24
Forum: DOS Batch Forum
Topic: Script for Listing Shares
Replies: 6
Views: 5811

Re: Script for Listing Shares

Try this code to get name and path of the shares. Thank you. If you have any spare code laying around that enumerates the permissions for each share in XP I'll also use it next time I work on this code. the "net share [sharename]" command lists permissions in Win7 but not XP, so I am forc...
by mirrormirror
11 Mar 2016 18:52
Forum: DOS Batch Forum
Topic: Script for Listing Shares
Replies: 6
Views: 5811

Script for Listing Shares

Does anyone have some pre-built code they'd be willing to share that lists SHARES with associated permissions to those shares? I currently create a temporary .vbs script using this code to get share names (then delete the .vbs file): strComputer = "." Set objWMIService = GetObject("wi...
by mirrormirror
11 Mar 2016 18:20
Forum: DOS Batch Forum
Topic: Preventing script collisions: allow only one instance per %1
Replies: 11
Views: 12153

Re: Preventing script collisions: allow only one instance per %1

I have a quick question on jeb's code: @echo off set "lockFileName=%~1_lock.tmp" 2>nul ( 4> "%lockFileName%" ( echo starting instance ping -n 2 localhost > nul ) || echo Failed %1 ) echo End %1 What does the " 4> "%lockFileName%" ( " line do? Or more specifica...
by mirrormirror
11 Mar 2016 17:52
Forum: DOS Batch Forum
Topic: mystery error in XP - but none in Win7
Replies: 4
Views: 4696

Re: mystery error in XP - but none in Win7

Thanks for the responses from all. And thank you Dave for the detailed reply and informative links - I believe you pinpointed my issue. 1) Abandon XP and use a more modern version of Windows - Probably not what you want to hear I laughed when I read that - because my script handles user/share/group ...
by mirrormirror
09 Mar 2016 23:40
Forum: DOS Batch Forum
Topic: mystery error in XP - but none in Win7
Replies: 4
Views: 4696

mystery error in XP - but none in Win7

As the title says - XP error - but win7 none. Notice the lines in this output example like "The system cannot find the file 쭀ŷ♣☼ŔЈ ": C:\>FOR /F "tokens=*" %A IN (" ?/cmd: "shUser=user1"; "shPrivs=none"") DO SET tmpLn=%A C:\>SET tmpLn=?/cmd: "sh...
by mirrormirror
08 Mar 2016 21:33
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2009409

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Actually, I may have resolved it - it's been a while since I've used regex but I remembered a few things. - I changed the line from this: call findrepl /o:13:13 < "%file%"|jrepl ".*" "SET \qmyVar2=$1\q" /x /i to: call findrepl /o:13:13 <"%file%" |jrepl "\...
by mirrormirror
08 Mar 2016 21:13
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2009409

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Thank you - it mostly works after testing on one file but one line fails: call findrepl /o:13:13 < "%file%"|jrepl ".*" "SET \qmyVar2=$1\q" /x /i produces: SET "myVar2=$1"SET "myVar2=$1" Line 13 is: "second.string here!" - no "SET"...
by mirrormirror
08 Mar 2016 17:44
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2009409

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Hey guys, here's my next issue. I need transform some files or create new files using data from existing files. In searching for a solution, I read through the findrepl thread and am on page 9 of this jrepl thread and my mind is a bit burnt out at the moment... I have not even attempted to code anyt...
by mirrormirror
07 Mar 2016 21:10
Forum: DOS Batch Forum
Topic: Advanced Batch features via auxiliary .exe programs
Replies: 76
Views: 214650

Re: Advanced Batch features via auxiliary .exe programs

just adding another example of syntax that would be nice to use:

Code: Select all

for /f %%a in ('file.txt') do colorshow /4F "%%a":100
by mirrormirror
07 Mar 2016 20:56
Forum: DOS Batch Forum
Topic: Advanced Batch features via auxiliary .exe programs
Replies: 76
Views: 214650

Re: Advanced Batch features via auxiliary .exe programs

I am afraid I don't understand what you mean with that. ColorShow.exe show caracters in given colors independently of any other current setting (like the color set by COLOR command). TextColor.exe set the color that will be used by posterior commands, including the standard Windows/DOS cmd.exe comm...