Search found 230 matches
- 04 Aug 2010 03:24
- Forum: DOS Batch Forum
- Topic: Get only first row for each file
- Replies: 10
- Views: 13961
Re: Get only first row for each file
Finally I chose this one that works fine in this way for /f "usebackq delims=" %%a in (%1) do echo.%%a>> C:\output.txt&goto :eof But I prefer take only 80 columns in the first raw like this for /f "usebackq delims=" %%a in (%1) do echo.%%a:~0,80%%%>> C:\output.txt&goto :e...
- 03 Aug 2010 06:34
- Forum: DOS Batch Forum
- Topic: Extract String and Variable Substitution
- Replies: 5
- Views: 5809
Re: Extract String and Variable Substitution
Perfect works fine, but if the data contains some 0 like abcd00045fghil how can I transform 00045 in a number for to be compared to other numeric data?
- 03 Aug 2010 04:57
- Forum: DOS Batch Forum
- Topic: Extract String and Variable Substitution
- Replies: 5
- Views: 5809
Extract String and Variable Substitution
Hello I have this problem to resolve This is the input line line = abcde1234fghil %Rec1%=6 (pos. start number) %Rec2%=4 (lengh data) I want a new variable like this (%new_var% = 1234) I write this code (is working fine with replace rec1 and rec2 with 6,4 but I want a variable because the position of...
- 02 Aug 2010 16:42
- Forum: DOS Batch Forum
- Topic: Get only first row for each file
- Replies: 10
- Views: 13961
Re: Get only first row for each file
Thanks to all for the reply the 1st script is too slow for big file, the second script from Saso is faster enought the 4st script from avery_larry is like mine (mine script doesn't work fine because I miss "&goto :eof" at the end of loop) But the 3st from aGerman is really stunning and...
- 02 Aug 2010 05:37
- Forum: DOS Batch Forum
- Topic: Get only first row for each file
- Replies: 10
- Views: 13961
Get only first row for each file
Hello,
I need to take only the first row of each file and write to another file
any suggestion?
Thanks
Dario
I need to take only the first row of each file and write to another file
any suggestion?
Thanks
Dario