Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I have a script I am working on and could use some help. Their are about 200 lines in script and I only need about 150 of them. They all copy fine. It is one line that doesn't copy correctly.
to keep it short here is the line that isn't copying correctly:
create table JBPM_LOG (ID_ numeric(19,0) identity not null, CLASS_ char(1) not null, INDEX_ int null, DATE_ datetime null, TOKEN_ numeric(19,0) null, PARENT_ numeric(19,0) null, MESSAGE_ varchar(4000) null, EXCEPTION_ varchar(4000) null, ACTION_ numeric(19,0) null, NODE_ numeric(19,0) null, ENTER_ datetime null, LEAVE_ datetime null, DURATION_ numeric(19,0) null, NEWLONGVALUE_ numeric(19,0) null, TRANSITION_ numeric(19,0) null, CHILD_ numeric(19,0) null, SOURCENODE_ numeric(19,0) null, DESTINATIONNODE_ numeric(19,0) null, VARIABLEINSTANCE_ numeric(19,0) null, OLDBYTEARRAY_ numeric(19,0) null, NEWBYTEARRAY_ numeric(19,0) null, OLDDATEVALUE_ datetime null, NEWDATEVALUE_ datetime null, OLDDOUBLEVALUE_ double precision null, NEWDOUBLEVALUE_ double precision null, OLDLONGIDCLASS_ varchar(255) null, OLDLONGIDVALUE_ numeric(19,0) null, NEWLONGIDCLASS_ varchar(255) null, NEWLONGIDVALUE_ numeric(19,0) null, OLDSTRINGIDCLASS_ varchar(255) null, OLDSTRINGIDVALUE_ varchar(255) null, NEWSTRINGIDCLASS_ varchar(255) null, NEWSTRINGIDVALUE_ varchar(255) null, OLDLONGVALUE_ numeric(19,0) null, OLDSTRINGVALUE_ varchar(4000) null, NEWSTRINGVALUE_ varchar(4000) null, TASKINSTANCE_ numeric(19,0) null, TASKACTORID_ varchar(255) null, TASKOLDACTORID_ varchar(255) null, SWIMLANEINSTANCE_ numeric(19,0) null, primary key (ID_))
Yes that is all one line. The batch file I am using to move it to another file is:
@ECHO OFF
SET FILESRCH=orig.txt
SET OUTFILE=MOD_orig.txt
:PRECHECK
DEL /Q %OUTFILE%
GOTO CREATE
:CREATE
setLocal EnableDelayedExpansion
for /f "tokens=* delims= " %%a in (%FILESRCH%) do (
echo %%a | find "create">>%OUTFILE%
)
PAUSE
:eofIt work for all the lines except this one, it stops at "NEWSTRINGIDCLASS_ varchar(255) null, " that is the last part it copies, I don't know why it stops.
NOTE: This is the longest line in the script.
Good luck and thanks.

It could be over the CMD's limit, I forget what it is exactly but that line is VERY long, so it's possible
I only Batch if possible, 2000 more lines of code, oh well.

I don't have a workaround. But it looks to me like it quit in the area of 1024. That could possibly be the limit.

There may be more oing on with your bat than the bit you posted, but leaving out the unneed stuff:
===============================================
@echo off & setLocal EnableDelayedExpansion > newfilefor /f "tokens=* delims= " %%a in (myfile) do (
echo %%a | findstr "create" >> newfile
)
================================================Or, far more simply:
findstr "create" < myfile > newfile
=====================================
If at first you don't succeed, you're about average.M2

It looks like that may just do the trick. I will test it later this afternoon and let you know. Thanks for your help either way.

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |