3 thoughts on “Batch File To Read Text File Line By Line into A Variable

  • Very thanks! I have been looking for how to do this for a very long time.

    Reply
  • Ramon Preston

    I need to write a small program (8-10 lines long) but I have forgotten how. Anyone willing to help?

    Reply
    • Ramon Preston

      I have a file (List.txt) that contains two fields. Field#1 is an URL. Field#2 is a file name.

      I want to check for the existence of Field#2. If it does NOT exist I want to run a PS command using Field#1

      Basically:

      (For loop to end of file.)
      read Field#1, Field#2
      If NOT exits Field#2 do
        call powershell -Command "invoke-WebRequest https://WvvwCUcr-OXe6ClIw.mp4 -Outfile C:/archives/You_CAN_Make_Time_for_Bible_Study.mp4"

      I used to write programs but 2 years ago I was “sick unto death.” Now it’s all gone. I don’t know where to start.

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *