::from (.\.\.\.\a_b.txt) reads the name of the file (a_b.txt) without extension (a_b) and swap the letter and outputs (b\a) into text file "7.txt"įOR /F "tokens=6 delims=\" %%G IN (.\2.txt) DO echo %%G >. ::reads the last file path from the "2.txt" and asign it to a variableįor /f "delims=" %%x in (.\2.txt) do set Build=%%x ::Reads all the files existing in "root2" folder and writes the path of each file into the "2.txt" file ::Reads all the folders and subfolders existing in the "root1" folder and writes the path for each foleder/subfolder into the "1.txt" file The string comes from a file name and once there is a match in the text file I want to use the sub-folder address to move the file there. I want to search for a string into this text file (the string will match only a part of a line) and if there is a match I want to copy into a variable that whole line. How can I search a string in a text file line by line and when found a match, copy that whole line where the match was found into a variable?īasically, I have a text file that contains the address/path of all sub-folders in a folder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |