guys, how do you remove an empty lines in a text file using dos batch?
I tried for loop then delimit the space, but i ended up with "echo on message" on the last part of my text file.
thanks in advance.
Search found 116 matches
- 21 Jul 2011 03:09
- Forum: DOS Batch Forum
- Topic: Quick question
- Replies: 6
- Views: 6117
- 16 Jul 2011 17:12
- Forum: DOS Batch Forum
- Topic: This might be tricky, Help.
- Replies: 0
- Views: 5145
This might be tricky, Help.
Hi Eveyone, how do you code this? i have these files with their file sizes: 357471675_OtherSupporting_page_0001.txt - more than 1000 bytes 357471675_OtherSupporting_page_0002.txt - more than 1000 bytes 357471675_OtherSupporting_page_0003.txt - more than 1000 bytes 357471675_OtherSupporting_page_0004...
- 08 Jul 2011 15:31
- Forum: DOS Batch Forum
- Topic: Is this doable or not?
- Replies: 7
- Views: 6313
Re: Is this doable or not?
thanks for the tip Dave. I have been messing around to do the replacement in batch but no luck. I think hex editor is the only way to do it.
- 07 Jul 2011 13:52
- Forum: DOS Batch Forum
- Topic: Is this doable or not?
- Replies: 7
- Views: 6313
Re: Is this doable or not?
i see.thanks for your time Dave.
- 07 Jul 2011 05:04
- Forum: DOS Batch Forum
- Topic: Is this doable or not?
- Replies: 7
- Views: 6313
Re: Is this doable or not?
Hi Dave,
I have tested you program and it only extract the next 42 lines and it stops.
this is my actual source.log: http://www.mediafire.com/?xhx1c23vey34aj5
I have tested you program and it only extract the next 42 lines and it stops.
this is my actual source.log: http://www.mediafire.com/?xhx1c23vey34aj5
- 06 Jul 2011 12:51
- Forum: DOS Batch Forum
- Topic: Is this doable or not?
- Replies: 7
- Views: 6313
Re: Is this doable or not?
thanks Dave, i thought its not that simple, ill try this soon.
- 06 Jul 2011 06:29
- Forum: DOS Batch Forum
- Topic: Is this doable or not?
- Replies: 7
- Views: 6313
Is this doable or not?
Hi everyone, I am wondering if this is doable. I have a log file with these contents: source.log basic: Applet initialized webServer= http://webcodingtpp.nl.post.tnt:80/servlet/TPP-ProductcoderenServlet [05 Jul 2011 01:59:04.151] Getting the image from the server:3768 msec. [05 Jul 2011 01:59:04.151...
- 03 Jul 2011 07:06
- Forum: DOS Batch Forum
- Topic: how do you code this?
- Replies: 4
- Views: 4134
Re: how do you code this?
Try that code: @echo off &setlocal enabledelayedexpansion set "src=incoming.txt" set "dest=out.xml" >"%dest%" type nul for /f "usebackq skip=1 tokens=* eol=" %%a in ("%src%") do ( set "line=%%a" for /l %%b in (1,1,50) do (set "lin...
- 03 Jul 2011 06:12
- Forum: DOS Batch Forum
- Topic: how do you code this?
- Replies: 4
- Views: 4134
Re: how do you code this?
yes aGerman I am sure, i am also using your replace script, the one you've given me in vbs, i am using semi-colon as delimeter so i can distiguish the value. Here's the code i am using: for /f "skip=1 tokens=1-3 delims=;" %%a in (source.txt) do ( echo ^<Name^>%%a^</Name^> >>file.xml echo ^...
- 03 Jul 2011 03:10
- Forum: DOS Batch Forum
- Topic: how do you code this?
- Replies: 4
- Views: 4134
how do you code this?
Hi Everyone, I have a text file with these contents: Name; Description; Remarks Tom; Wild; ; John; ; Absent; ; Honest; Present; What I am doing is that I am extracting the contents into xml using for loop delimited by semi-colon (;), my output: <Name>Tom</Name> <Description>Wild</Description> <Remar...
- 24 Jun 2011 22:26
- Forum: DOS Batch Forum
- Topic: is this doable?
- Replies: 9
- Views: 8305
Re: is this doable?
thanks Acy for the code. Working great.
- 24 Jun 2011 21:51
- Forum: DOS Batch Forum
- Topic: is this doable?
- Replies: 9
- Views: 8305
Re: is this doable?
it will keep going til the end of the file.
- 24 Jun 2011 20:56
- Forum: DOS Batch Forum
- Topic: is this doable?
- Replies: 9
- Views: 8305
Re: is this doable?
i hope it is doable
- 24 Jun 2011 20:43
- Forum: DOS Batch Forum
- Topic: is this doable?
- Replies: 9
- Views: 8305
Re: is this doable?
to simplify, I just want to find a specific string and when found it will echo the line after the found line of the found string.
- 24 Jun 2011 20:19
- Forum: DOS Batch Forum
- Topic: is this doable?
- Replies: 9
- Views: 8305
is this doable?
for example: test.xml <Supplier>Random strings</Supplier> <Number /> <Description /> <Unit /> <Amount /> <Table> <Number /> <Description /> <Unit /> <Amount /> findstr "<Supplier>" test.xml and echo the next line, so the output is: <Number /> anyone?