Search found 185 matches

by goodywp
29 May 2019 07:19
Forum: DOS Batch Forum
Topic: Why this temp read params not find anymore plus some script not open properly
Replies: 2
Views: 420

Re: Why this remp read params not find anymore

ShadowThief wrote:
28 May 2019 19:47
BaseMain.cfg (whatever that is) seems to have been deleted
Thanks for your reply! Yes I was thinking that way but checked that the file was there...
by goodywp
28 May 2019 11:08
Forum: DOS Batch Forum
Topic: Why this temp read params not find anymore plus some script not open properly
Replies: 2
Views: 420

Why this temp read params not find anymore plus some script not open properly

Hi all, I just came across this issue, sth. related to system. Added new related issue. For certain script, before behavior is whenever double clicking on the file, it shall pop up the screen to do interactive input then the script go on Now the the above behavior not work as supposed to be. After d...
by goodywp
29 Nov 2018 04:55
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

For changeable strings to remove from ED's original scripts, I just modified as below then tested and works fine for me. Just cut off the changeable part of the strings then set as new variable, which will be used in ED's original code. Thanks ED again. @echo off &setlocal enableDelayedExpansion set...
by goodywp
29 Nov 2018 04:49
Forum: DOS Batch Forum
Topic: About call Function with Arguments
Replies: 3
Views: 512

Re: About call Function with Arguments

Squashman wrote:
28 Nov 2018 16:30
When file and folder names have spaces in them, what are you supposed to do?
OOPS again the space forgot to take care of.. My bad..
Should I delete this post, please advise...
Thanks
by goodywp
28 Nov 2018 16:03
Forum: DOS Batch Forum
Topic: About call Function with Arguments
Replies: 3
Views: 512

About call Function with Arguments

I just had a test about call function with arguments @echo off echo.going to execute myDosFunc with different arguments set fdl_1=function1 set fdl_2=function2 set fdl_3=function3 call:myDosFunc %fdl_1% *xt1.txt call:myDosFunc %fdl_2% *xt2.txt call:myDosFunc %fdl_3% *xt3.txt goto:eof ::-------------...
by goodywp
26 Nov 2018 13:56
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

Now cross posted on StackOverFlow . Hi, Squashman, Please advise on this... When I continue to ask the same topic related question, you said "Starting to sound like scope creep." In order to avoid this, I would ask the similar question on StackOverFlow… you again gave your comment... Would you plea...
by goodywp
26 Nov 2018 11:14
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

You could use findstr which does support regular expressions Echo.Hello There |findstr ".*Th?r?" But you should usually try to avoid findstr because this slows down significantly. With the faster set you can cut off the start of a variable set "$=Hello There" set "$=%$:* =%"%= strip off 'Hello ' =%...
by goodywp
26 Nov 2018 08:56
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

Hi ED, Since I had two questions related tho this post, which are as below: 1) The code in this post is working for cutting off the block before certain string in the middle of the text, then also try to remove certain strings in the remaining (keeping) to end. If I want to delete some strings which...
by goodywp
24 Nov 2018 07:47
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

@echo off &setlocal enableDelayedExpansion set "$fileIn=Load_all.M72" set "$fileOu=Load_NAR.M72" > "!$fileOu!" type nul for /F %%? in ( '^( find /V /C"" ^< "!$fileIn!" ^) 2^>nul' ) do set "$NumberOfLines=%%?" < "!$fileIn!" ( set /A $at = 0 &for /L %%i in ( 1, 1, !$NumberOfLines! ) do ( set "$=" &se...
by goodywp
24 Nov 2018 05:27
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

If I want to remove more lines as below code @echo off &setlocal enableDelayedExpansion set "$fileIn=Load_all.M72" set "$fileOu=Load_NAR.M72" > "!$fileOu!" type nul for /F %%? in ( '^( find /V /C"" ^< "!$fileIn!" ^) 2^>nul' ) do set "$NumberOfLines=%%?" < "!$fileIn!" ( set /A $at = 0 &for /L %%i in ...
by goodywp
23 Nov 2018 16:27
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

;---- NAR signed binaries -epackage ;---- Component: Tetra Admin Resources 0001 ;---- Catalog: TA_resources.mxx 8520440000_852044.P3P ;---- Component: Tetra Admin Proxy Lib 0001 ;---- Catalog: TAProxylib_app.mxx 8400000100000000_libTAProxy.P3L ;---- Component: NAR TSA Tetra 0521 ;---- Catalog: 8295...
by goodywp
23 Nov 2018 16:12
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

I downloaded your sample, and I notice the file is using LF as line terminator but dos expects CRLF. So the lines are never terminated and cause the variable to overflow as it can only hold 8kb and your input is 12kb which I believe explains the data getting lost. Then this 8kb is treated as a sing...
by goodywp
23 Nov 2018 15:57
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

I downloaded your sample, and I notice the file is using LF as line terminator but dos expects CRLF. So the lines are never terminated and cause the variable to overflow as it can only hold 8kb and your input is 12kb which I believe explains the data getting lost. Then this 8kb is treated as a sing...
by goodywp
23 Nov 2018 13:36
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

I also used this site library function as below: @ECHO OFF REM.-- Prepare the Command Processor SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDELAYEDEXPANSION echo.Extracting hello world block into "Load_NAR.M83" file call:extractFromFile ";---- NAR signed binaries" "DEVICE_ID.TXT">"Load_NAR.M83" ::-----...
by goodywp
23 Nov 2018 13:17
Forum: DOS Batch Forum
Topic: How to cut off some blocks off the entire file then save into separated file
Replies: 23
Views: 1650

Re: How to cut off some blocks off the entire file then save into separated file

;---- NAR signed binaries -epackage ;---- Component: Tetra Admin Resources 0001 ;---- Catalog: TA_resources.mxx 8520440000_852044.P3P ;---- Component: Tetra Admin Proxy Lib 0001 ;---- Catalog: TAProxylib_app.mxx 8400000100000000_libTAProxy.P3L ;---- Component: NAR TSA Tetra 0521 ;---- Catalog: 8295...