Announcement

Collapse
No announcement yet.

Please help with code

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Please help with code

    If someone could please help me with batch script code to do the following I'd appreciate it.

    I have a comma delimited text file called "stats_record.txt" that contains about 10,000 lines
    each line is in the following format with different values for each field in each line.

    01a,3,2,2,12,13,02,08,11

    I need to be able to read the file and place the 9 fields into variables in a batch file i want to call the variables field1 thru field 9 and then output a new text file called "stats_out.txt" which will create the same number of lines but will assign the fields to peoples names

    Each line will have a name associated with each field and that name along with the field will be written to the out put file


    So the first output record will look like this


    Mary 01a,Bob 3,Charlie 2,Tina 2 ,Rachel 12,Jose 13,Louis 2,Don 8,Paul 11.

    in the records that follow, Mary will always be assigned to the values in field 1, bob field 2 Charlie field 3 etc.

    Thanks a lot in advance
    Ed

  • #2
    Re: Please help with code

    Moved to scripting forum
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment

    Working...
    X