Link to home
Create AccountLog in
Avatar of E J Pope
E J PopeFlag for United States of America

asked on

Bat to modify a file

I have very little experience writing .bat files and need some help.  I have a  file that I grab from an FTP site and then send it through this .bat file to modify it.  The file is always in the same format, but the file name varies.  

Here is what I am trying to do:
1.  strip off the header line
2.  When tank name = 'Handy Mart 144' and Product = '1' then save 'Last Update' as 144datetime
3.  echo the lines with tank name 'Handy Mart 144', but leave out columns a, d, f, and g, column h must equal datatime
4.  When tank name = 'Handy Mart 163' and Product = '1' then save 'Last Update' as 163datetime
3.  echo the lines with tank name 'Handy Mart 163', but leave out columns a, d, f, and g, column h must equal datatime

Attached is my feable attempt at code.  Can I get some help to make this do what I  need to do?

Thanks,
Cindy
Avatar of E J Pope
E J Pope
Flag of United States of America image

ASKER

ASKER CERTIFIED SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Thank you so much...this works perfectly and I learned more tricks to programming.