读取txt文件中的每一行

读取txt文件中的每一行

本文介绍了读取txt文件中的每一行,并使用Windows dos命令分配变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过使用超越比较命令行比较那两个文件夹,将文件从一个路径复制到svn工作副本.使用超越比较完成比较后,将生成报告.如果右边有任何多余的文件,应从svn代表处删除.所以我正在使用下面的for循环遍历该文件.我想对txt文件中所有正确的孤立文件使用svn delete

I am copying the files from one path to svn working copy by comparing the those 2 folders using beyond compare commandline. Report will get generated after the comparison is done using beyond compare. If any extra files are present in the right side should get deleted from svn repsotiory. So I am using a below for loop to loop through that file. I want to use svn delete for all the right orphaned files in the txt file

FOR /F "tokens=* delims= usebackq" %%x IN (%TEXT_T%) DO (

echo %%x

)

能否让我知道如何在txt文件中分配每一行,以及如何为此应用svn delete命令?

Can you please let me know how can I assign the each line in the txt file and how can I apply svn delete command for that?

任何帮助将不胜感激

推荐答案

听起来您真正想要的只是:

It sounds like what you really want is just:

FOR /F "tokens=* delims= usebackq" %%x IN (%TEXT_T%) DO (
svn delete %%x
)

这篇关于读取txt文件中的每一行,并使用Windows dos命令分配变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 10:05