Search found 211 matches

by thefeduke
26 Jan 2016 16:20
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2012331

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

To close input, press <Ctrl-Z> and press <Enter>. I'm not sure what is causing the 2nd JREPL to wait for input, but I know your logic is wrong. Thank you, Dave. The waiting for input neophyte question was not directly related, but my occasional coding errors have nullified the input file but allowe...
by thefeduke
26 Jan 2016 00:22
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2012331

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

The first JREPL is really simple - it removes all lines after the word in brackets. It does this by searching for the bracketed word, and when found, sets quit to 1 (true), and substitutes with itself. Thank you, Dave, for these last two examples. These code models are teaching me enough to plagiar...
by thefeduke
22 Jan 2016 13:59
Forum: DOS Batch Forum
Topic: Share your Scripts!
Replies: 11
Views: 8180

Re: Share your Scripts!

I think links to the best scripts and a description would be good but not the whole scripts. I am still discovering gems of information in long dormant topics that I could not find or refind if I looked for them. I have not mastered refining searches on guesses for words chosen by others, getting v...
by thefeduke
21 Jan 2016 01:38
Forum: DOS Batch Forum
Topic: Use Relative path in Batch file?
Replies: 5
Views: 7875

Re: Use Relative path in Batch file?

To add the d and p modifiers to the variable %%A one can use %%~dpA, as you have done.
Similarly, to modify the variable %~0, one would use %~dp0, rather than %%~dp0.
John A.
by thefeduke
20 Jan 2016 17:53
Forum: DOS Batch Forum
Topic: Setting up scripting environment
Replies: 9
Views: 8472

Re: Setting up scripting environment

No, Foxidrive I never did. Honestly, it was so long ago that I forgot all about it. I'd still like to figure it out though. Any thoughts? It strikes me that this works with just a desktop shortcut. I put a little zipped file on http://1drv.ms/1RTK4wi that would give you this: http://i.imgur.com/ifx...
by thefeduke
15 Jan 2016 16:35
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2012331

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

Now I just miss the code to replenish it, or in other words, add the <Autorun> line where is not present. Unfortunately I cannot use the code suggested by thefeduke (btw, thank you too!) You are most welcome, Nuv, but your revelation about the data file spurred my stubbornness to learn a bit more a...
by thefeduke
12 Jan 2016 12:11
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2012331

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

2) I run your code in a batch (this batch, jrepl.bat and test.txt in the same directory) The file is actually edited but it shows no differences, "Autorun" line is still there... I set up your test like this (Revised: input data and solution) : @Echo Off &SetLOCAL &Rem.and keep en...
by thefeduke
06 Jan 2016 17:04
Forum: DOS Batch Forum
Topic: Escaping an ampersand character
Replies: 36
Views: 24841

Re: Escaping an ampersand character

However if I suppress the carriage return then it does work for this purpose. I did this with: echo|set /p=. 1>&2 This prints a dot followed by a space with no carriage return. I was trying to print the dot without the space, but couldn't figure out how to do that. I think that the space disapp...
by thefeduke
24 Dec 2015 12:56
Forum: DOS Batch Forum
Topic: Folder Size Return 0
Replies: 19
Views: 12200

Re: Folder Size Return 0

i beleive I wrongly stated something. I want the log.txt to only be present in sub2 for the size ofsub2 and no other. The sub2 will be the directory which grows in size and will be the location of the php script that will be executed. I know the log is currently create for main, sub1 and sub2. When...
by thefeduke
24 Dec 2015 00:26
Forum: DOS Batch Forum
Topic: Folder Size Return 0
Replies: 19
Views: 12200

Re: Folder Size Return 0

is there a way to calc the values as it is doing but only for sub1 (which would include the size of sub2) but without entering into sub2 and adding it's size up? Or a way to prevent it from trying to execute the php in sub2? As it stands now I believe that each directory could have a log file the i...
by thefeduke
23 Dec 2015 23:01
Forum: DOS Batch Forum
Topic: [SOLVED] file rename to date and time created
Replies: 10
Views: 6837

Re: file rename to date and time created

foxidrive wrote:

Code: Select all

for %%a in (*-*-*) do for /f "delims=/: " %%b in ("%%~ta") do ren "%%a" "%%b.%%c.%%d-%%e%%f"
Replacing

Code: Select all

"delims=/: "
with

Code: Select all

"tokens=1-5* delims=/: "
should help.
John A.
by thefeduke
22 Dec 2015 02:29
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 43411

Re: Sdel - speedy deletion utility

Nice collaboration, moderators! Foxidrive's repackaging addressed the bad CD exposure that concerned me. Now that I have recovered from Monday night pool, I'll apologize for some "senior moments" over the weekend. This topic piqued my interest about last Friday and I got so consumed in for...
by thefeduke
21 Dec 2015 16:01
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 43411

Re: Sdel - speedy deletion utility

is the a reson why you replaced the "%" with "!" Please re-read my post above where I wrote: If the rename order is corrected, errors will occur when multiple files are renamed to the same filename. Use !random! instead of %random% and ensure that delayed expansion is enabled. W...
by thefeduke
20 Dec 2015 15:39
Forum: DOS Batch Forum
Topic: Simple concatenation fails
Replies: 3
Views: 3774

Re: Simple concatenation fails

This is simpler, but works as well:

Code: Select all

FOR /F "tokens=2,3,4 delims=/ " %%a in ("%date%") do set yy=%%c& set mm=%%b & set dd=%%a
John A.
by thefeduke
19 Dec 2015 23:29
Forum: DOS Batch Forum
Topic: Sdel - speedy deletion utility
Replies: 64
Views: 43411

Re: Sdel secure speedy deletion utility

like this? and it still doesn't work. cd /d %d% for %%a in (*.*) do type nul > %%a for %%a in (*.*) do ren "sdel%random%.sdel" %%a for %%a in (*.*) do del *.sdel %%a It does show symptoms of not working because it produces error messages, but it IS working but not as intended. ⋅ ...