FOR /F can't use multiple commands and how to solve it
Hi, welcome to this video. In this video we will discuss about issue that FOR /F can't use multiple commands and how to solve it.
You know that FOR /F can be used to parse the file and eventually we sometimes need to do multiple commands against the tokens (the result of parse).
So the solution is just use the ampersand sign between the commands. For example:
1. Create a file and type anything as the content and saved
2. Open a notepad and type below commands:
FOR /F "tokens=* delims=" %%i ("C:\Users\Totzfreelance\Documents\BATCH SCRIPT\fileforslashf.txt") DO echo This is the first command that FOR /F do&This is the second command that FOR /F&echo This is the third command that FOR /F do.
3. Save the command and run it using cmd.
I hope you like the video and don't forget to subscribe. Thanks!