How Do I turn List fo files listed Horizontally to a vertical list

  • Thread starter Thread starter Ray at
  • Start date Start date
Hi All,

Have a list of files in a text file but listed horizontally.


File1.txt file2.txt file3.txt

I would like it to be in a file like

File1.txt
File2.txt
File3.txt


regards,
Raymond
 
Raymond said:
Hi All,

Have a list of files in a text file but listed horizontally.


File1.txt file2.txt file3.txt

I would like it to be in a file like

File1.txt
File2.txt
File3.txt


regards,
Raymond

C:\cmd>c:\temp\filelist
File1.txt
file2.txt
file3.txt
file4.txt
file5.txt

C:\cmd>type c:\temp\filelist.cmd
@echo off
for %%a in (
File1.txt file2.txt file3.txt file4.txt file5.txt
) do echo %%a

OR

C:\cmd>c:\temp\filelist File1.txt file2.txt file3.txt file4.txt file5.txt
File1.txt
file2.txt
file3.txt
file4.txt
file5.txt

C:\cmd>type c:\temp\filelist.cmd
@echo off
for %%a in (%*) do echo %%a
 
Or open the .txt file with excel as space delimited, then use the transpose
function.
 
Back
Top