批处理脚本读取输入的文本文件,并进行文本文件进行输入文本文件的每一行 [英] Batch script to read input text file and make text file for each line of input text file

查看:151
本文介绍了批处理脚本读取输入的文本文件,并进行文本文件进行输入文本文件的每一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有在位置 C时输入文件:/temp/sample.txt ,它由一个单词在文本文件中的每一行。为了支持UI,我需要每行显示为在前端的文本文件。所以我想一个批处理脚本,这将产生文本文件输出在同一个文件夹中输入文本文件的每一行。你可以请建议是否有可能使它?

I am having an Input file in the location C:/temp/sample.txt, which consists of one word in each line of the text file. For supporting UI, I need each line to be displayed as text file in front end. So I want a batch script which will produce output as text files for each line of the input text file in the same folder. Can you please suggest whether it is possible to make it?

推荐答案

这是可能的的命令:

for /f %i in (input.txt) do echo. > %i

使用%%我在批处理文件,而不是%I

这篇关于批处理脚本读取输入的文本文件,并进行文本文件进行输入文本文件的每一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆