batch file - Save filenames to textfile and add a string in front of line -
i save output of list of files file (by using windows batch file). know can command dir /b *.* > start.txt
, each line in file "start.txt" add together @@ in front end of file name. contents of start.txt should be:
@@filename1 @@filename2 ...
i know using command echo
can add together text. how can each line written file?
use for
parser on output of dir
:
(for /f "usebackq" %%l in (`dir /b \`) echo @@%%l) > start.txt
note %%
escaping - required when running within .bat/.cmd, presumably are.
batch-file cmd text-files filenames dir
No comments:
Post a Comment