1 Replies - 16395 Views - Last Post: 07 July 2011 - 05:16 AM

#1 vijaiitbbs   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 04-July 11

copy txt file to do file using batch file

Posted 04 July 2011 - 06:34 AM

hey, i am trying to create a batch file which takes input from a txt (abc.txt)
abc.txt is somthing like1-Nord-Polen:1
2-Süd-Polen:0
3-Litauen:1
4-Lettand:0
Now, what I need to do is to check the number(0/1) after : in txt file using bat file and if it is 0..skip it and if it is 1..copy that(ex.1-Nord-Polen) in a comma saparated do file.
Is This A Good Question/Topic? 0
  • +

Replies To: copy txt file to do file using batch file

#2 no2pencil   User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6968
  • View blog
  • Posts: 31,958
  • Joined: 10-May 07

Re: copy txt file to do file using batch file

Posted 07 July 2011 - 05:16 AM

What have you tried?

This would be relatively easy in Linux, cat file pipe to cut on delimiter character ':', field 2, grep for 0 or 1. What version of Windows is this running on? Do you have power shell installed?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1