Batch new line variable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cadab
    New Member
    • Aug 2009
    • 7

    Batch new line variable

    I have a txt file that contains a few lines of data, i also have a for loop that extracts this data into one variable, i then email this variable using 'blat'. The problem is, the extracted data consists on one line, and i need to be able to email this in a more coherent form, i.e. having each line in the text file displayed in the email in the same way(with new lines).

    I've tried playing around with adding '\n' to the variable but this just outputs that actual '\n' rather than a new line.

    Is it possible to have new lines within a variable or do i need separate variables for each line?

    Thanks,
    James
  • RedSon
    Recognized Expert Expert
    • Jan 2007
    • 4980

    #2
    The problem is that windows does not accept \n as newline, I think you need \r\n

    Or maybe its \c\n?

    I can never remember, anyway its "carriage return" first then "new line". You can look up how to create a carriage return.

    Comment

    Working...