Every line of txt as variable

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Tami
Posts: 10
Joined: 31 Mar 2017 11:01

Every line of txt as variable

#1 Post by Tami » 27 Sep 2018 07:43

Hi,
so i wanted to execute a command with every line of a txt file.

Example:
This txt file with links

Code: Select all

https://www.youtube.com/watch?v=xcJtL7QggTI
https://www.youtube.com/watch?v=0vrdgDdPApQ
https://www.youtube.com/watch?v=D24lUBJLNMY
https://www.youtube.com/watch?v=Bey4XXJAqS8
https://www.youtube.com/watch?v=r29leOOey-c
Then this command:

Code: Select all

"x.exe --link %link%"
after the program is done, it should take the second link of the txt file and repeat the command with the new link.

I have tried many things, but unfortunately nothing has worked...

Thank you!
Last edited by Squashman on 27 Sep 2018 08:00, edited 1 time in total.
Reason: Please try not to use external links.

Squashman
Expert
Posts: 4106
Joined: 23 Dec 2011 13:59

Re: Every line of txt as variable

#2 Post by Squashman » 27 Sep 2018 08:02

Tami wrote:
27 Sep 2018 07:43
I have tried many things, but unfortunately nothing has worked...
Please post what you have tried so that we can help you learn.

Post Reply