FOR /F can't use multiple commands and how to solve it

Subscribers:
613
Published on ● Video Link: https://www.youtube.com/watch?v=d9c82_9SR60



Category:
Guide
Duration: 11:54
28 views
0


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!




Other Videos By Computertechlighthouse


2020-04-14SMALL BASIC: Free factorial calculator
2020-04-06In waves - Trivium vocal cover by Totzfreelance not too good but I've tried
2020-03-28Strange moon and star aligning found today 28-03-2020, 19:00
2020-03-28I make Matrix the movie intro like using Small Basic
2020-03-26How to troubleshoot Python IDLE can't run or F5 file (IDLE's subprocess didn't make connection)
2020-03-14Batch Language: Extracting a substring from a string!
2020-03-13Audacity Tutorial: Silencing, DTMFing, Noising, etc. your song part!
2020-03-09Cisco Packet Tracer Activity 5.5.1 Explaination Part 1
2020-03-09Cisco Packet Tracer Activity 5.5.1 Explaination Part 2
2020-03-08Cisco Packet Tracer LAB 5.5.2: Router Segment Broadcast Domains
2020-03-05FOR /F can't use multiple commands and how to solve it
2020-03-04How to ping a range of IP addresses using Windows BATCH FOR /L command
2020-03-02How to run powershell script (.ps1) for the first time (How to fix SecurityError)
2020-03-01How to search for File(s) on your Windows computer using command line (cmd)
2020-02-26How to set a network interface IP address using netsh subcommands
2020-02-26How to rename a network interface using netsh interface subcommand
2020-02-26How to disable and enable a network interface quickly using netsh subcommand
2020-02-26How to use netsh interface command to determine all of or one of your interface IP address quickly
2020-02-03How to play Donkey Kong 64 with Project64 (a Nintendo Emulator) [Easy]
2020-01-25Asus Zenfone Troubleshooting can't finished bootup forever / freezing
2018-06-25How to instal font from google font on windows 7