Search found 5 matches
- 20 Aug 2017 21:47
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 9205
Re: changing a 'Column' in a tab-delimited text File
Ok I noticed the problem with both of you codes, they don't allow for a empty/null column entry. Is there any way to fix this?
- 18 Aug 2017 16:35
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 9205
Re: changing a 'Column' in a tab-delimited text File
Simpler : @echo off (for /F "tokens=1-5" %%a in (input.txt) do ( if "%%e" neq "" ( echo %%a %%b %%c %%d:%%e ) else ( echo %%a %%b %%c:%%d ) )) > output.txt Just be sure to insert the proper separators in echo command in each case: a TAB after %%a and %%c and a space af...
- 18 Aug 2017 05:55
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 9205
Re: changing a 'Column' in a tab-delimited text File
elzooilogico wrote:My fault, I didn't read carefully. I've seen a delimiter and assumed they were all the same. Then, this should do the job, as the only valid delimiter is tab.
You are amazing, it works perfectly!
- 17 Aug 2017 16:16
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 9205
Re: changing a 'Column' in a tab-delimited text File
I have a very large tab-delimited text file with 4 columns and many rows. I want a batch file to replace the third tab on each row with a colon. Here is an example of input and desired output: input(always 4 columns): username[tab]firstname[space]lastname[tab]email[tab]number username[tab]firstname...
- 17 Aug 2017 02:50
- Forum: DOS Batch Forum
- Topic: changing a 'Column' in a tab-delimited text File
- Replies: 9
- Views: 9205
changing a 'Column' in a tab-delimited text File
I have a very large tab-delimited text file with 4 columns and many rows. I want a batch file to replace the third tab on each row with a colon. Here is an example of input and desired output: input(always 4 columns): username[tab]firstname[space]lastname[tab]email[tab]number username[tab]firstname[...