大家好~~
上次的問題有問到解答了!!
這兩行CMD指令可以做到:
D:
FOR /F %I IN ('DIR /A-D /B /S AfolderUnderD\*.txt') DO (ECHO ####%I>>dir1.txt
& ECHO.>>dir1.txt & TYPE %I>>dir1.txt & ECHO.>>dir1.txt & ECHO.>>dir1.txt)
出來是這樣: ####D:\AfolderUnderD\A.txt
hello,
everyone
####D:\AfolderUnderD\B\B-1.txt
my name is John
想再請問說 如果我想把路徑擺在每一行的前面 而非只有開頭一行
像是: D:\AfolderUnderD\A.txt #### hello,
D:\AfolderUnderD\A.txt #### everyone
D:\AfolderUnderD\B\B-1.txt #### my name is John
請問該如何做呢?
有試成功會酬謝2000P
感謝!!!