Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は DOS コメントに非常に慣れていません。非常に多くのエントリを持つテキスト ファイルがありますが、区切り文字で区切られています (例: Hi; conf.txt; 161; new team)
すべてのセパレーションを別々の行に印刷したいと思います。
例: 出力は Hi conf.txt 161 new team である必要があります
案内してもらえますか?
試す:
@echo off setlocal enabledelayedexpansion (for /f "tokens=*" %%a in (file.txt) do ( set str=%%a echo !str:;=! ))>file.tmp move file.tmp file.txt >nul
「file.txt」はテキスト ファイルの名前です (バッチ ファイルの両方の場所で変更する必要があります)。