Search found 3574 matches

by Squashman
12 Jan 2018 15:18
Forum: DOS Batch Forum
Topic: Put a registry key in variable and split it up!
Replies: 4
Views: 71

Re: Put a registry key in variable and split it up!

Code: Select all

for /F "skip=1 tokens=3 delims=." %%G IN ('reg query "HKEY_CLASSES_ROOT\Word.Application\CurVer" /ve') do set ver=%%G
by Squashman
12 Jan 2018 08:47
Forum: DOS Batch Forum
Topic: Read a file by line by line and store some specific values in another text file through bat file
Replies: 2
Views: 55

Re: Read a file by line by line and store some specific values in another text file through bat file

So you already know how to read a file line by line with the FOR /F command based on the advice you were given at StackOverFlow . Now all you need to do is add to that code. The DELIMS option allows you to break up the line into multiple variables known as TOKENS to the FOR command. In your case you...
by Squashman
11 Jan 2018 16:46
Forum: DOS Batch Forum
Topic: Insert suffix to every line in TXT file
Replies: 2
Views: 37

Re: Insert suffix to every line in TXT file

Code: Select all

@echo off
(for /f "delims=" %%a in (c:\sandbox\original.txt) do (
    set /a N+=1
    echo %%a"
))>c:\sandbox\new.txt
No idea what you are tying to do with the N variable.
by Squashman
11 Jan 2018 10:53
Forum: DOS Batch Forum
Topic: copy with regular expression how to
Replies: 8
Views: 84

Re: copy with regular expression how to

actually it is the scheduling tool that execute the windows command. i supply the windows command to the scheduling tool and it will execute it. The variables you are using are coming from the Tidal. So in essence you are working within the confines of the Tidal Scheduling software. I don't think w...
by Squashman
11 Jan 2018 10:21
Forum: DOS Batch Forum
Topic: copy with regular expression how to
Replies: 8
Views: 84

Re: copy with regular expression how to

This is really out of scope for DosTips.com. Your problem is with the scheduling software you are using and has nothing to do with Windows batch files or other Windows Scripting Languages.

I bet if you read the user guide you would find your answer.
by Squashman
11 Jan 2018 09:44
Forum: DOS Batch Forum
Topic: copy with regular expression how to
Replies: 8
Views: 84

Re: copy with regular expression how to

Did you try removing the asterisk?
by Squashman
10 Jan 2018 12:39
Forum: DOS Batch Forum
Topic: Help with Code Flattening a Excel Document to Remove Duplicate Records
Replies: 2
Views: 37

Re: Help with Code Flattening a Excel Document to Remove Duplicate Records

Sounds like you need a VBA macro. That is out of scope for DosTips.com. We mostly handle .bat (batch) files and some jscript and vbscript. Batch files cannot manipulate Excel files. Vbscript, Jscript and Powershell can to some extent edit excel files but you would probably be better off with a VBA m...
by Squashman
09 Jan 2018 14:50
Forum: DOS Batch Forum
Topic: How to chop off substrings in the txt file
Replies: 6
Views: 110

Re: How to chop off substrings in the txt file

This is basic string manipulation as described here. Lots of examples for you to look at.
by Squashman
05 Jan 2018 13:57
Forum: DOS Batch Forum
Topic: Save and load in batch RPG
Replies: 3
Views: 95

Re: Save and load in batch RPG

Sure would like to know where you got that code from.

Regardless of that, what do you want the SAVE file to look like.
by Squashman
05 Jan 2018 12:34
Forum: DOS Batch Forum
Topic: Rpg assistance
Replies: 5
Views: 105

Re: Rpg assistance

The if command does not have an /a option.

Code: Select all

if /a %weapon%==1 
by Squashman
05 Jan 2018 09:52
Forum: DOS Batch Forum
Topic: JREPL.BAT v7.9 - regex text processor now with Unicode and XRegExp support
Replies: 348
Views: 88054

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

naraen87 wrote:
05 Jan 2018 04:36
In the Above property file I've change value of Environment to UAT1-v6.19.15.0
I don't know about the current value of Environment.
You would not even need to use JREPL to accomplish this task. A FOR /F command with the tokens and delims options would do the trick. Just my two cents.
by Squashman
04 Jan 2018 09:37
Forum: DOS Batch Forum
Topic: Delete many files, need help for creating
Replies: 8
Views: 103

Re: Delete many files, need help for creating

newbieasking wrote:
04 Jan 2018 09:18
I ask
because I dont wanna delete good files.
What is stopping you from creating a TEST folder to test code on?
Why not create a folder: C:\testing\dir1\dir2\dir3
Copy or create a bunch of random files in it.
And test your command.
by Squashman
04 Jan 2018 09:16
Forum: DOS Batch Forum
Topic: Delete many files, need help for creating
Replies: 8
Views: 103

Re: Delete many files, need help for creating

Another problem, thank You again. del /f /s /q /a *.fmt So I think its possible to do something like: del /f /s /q /a c:\dir1/dir2/dir3/*.fmt so del should see only the directory c:\dir1/dir2/dir3 and del is ignoring the rest of the HD. Is that task ok: del /f /s /q /a c:\dir1/dir2/dir3/*.fmt Sorry...