Search found 7 matches

by batching1
22 Jul 2010 14:07
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Re: Delete rows from csv file when column value is not equal

but why wont it pick up za****** and ZA******...it shud delete only john doe row in this example...
by batching1
22 Jul 2010 12:55
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Re: Delete rows from csv file when column value is not equal

Hi aGerman, I was able get it working..thank you..another question...very similar... below is the code: zA214746,USA,forest zA221619,USA,forest zA228274,USA,forest zA229340,USA,forest John Doe,USA,forest zA237972,USA,forest YA987989,USA,forest ya989898,USA,forest woy898989,USA,forest i want to now d...
by batching1
22 Jul 2010 11:31
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Re: Delete rows from csv file when column value is not equal

this time it is copying the header from old file to new file, but not processing the data. this is what i have: @echo off &setlocal set /p "header="<"C:\Documents and Settings\a4\Desktop\ert\z\z.csv" >"C:\Documents and Settings\a4\Desktop\ert\z\new.csv" echo.%header...
by batching1
22 Jul 2010 11:01
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Re: Delete rows from csv file when column value is not equal

Hi it did not work...i guess i am missing something here... This is my sample file: number(1 tab space)city(1tab space)country 1 abc forest 2 jk super 3 kj forest now each column is seperated by 1 tab space in my csv file. I want to check coumn 3 which is country coumn and it anyting is not equal to...
by batching1
22 Jul 2010 10:34
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Re: Delete rows from csv file when column value is not equal

space/tab

Also instead of number i want to delete all rows where column3 in csv is equal the word forest.
by batching1
22 Jul 2010 10:11
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Re: Delete rows from csv file when column value is not equal

Hi,

Thank you, Yes by csv imean comman seperated values.
The code will not work for me....it shows a blank output file.
My csv filw format is similar to a excel format...columns in seperate coumns and not comma or space...just like excel you can say...
by batching1
22 Jul 2010 08:53
Forum: DOS Batch Forum
Topic: Delete rows from csv file when column value is not equal to
Replies: 22
Views: 25930

Delete rows from csv file when column value is not equal to

Hi, I have a csv file in the below format col1 col2 col3 col4 1 a 0 ree 2 b 3 ere 3 c 34 werwe 4 d 0 jkl I want to delete rows where cols3 is not equal to 0(in this case row 2 and 3) and the header should remain intact as well. output should be : col1 col2 col3 col4 1 a 0 ree 4 d 0 jkl Anyhelp here?