Obtaining a list of files from a specific directory
- by Steve Robathan
I can get a list of files from a text file from a specific directory, but they are naturally in singles. I need to create a text file that will give the contents, but all in 1 line separated by a space. My batch is here:
dir /a /b /-p /o:gen %USERPROFILE%\Desktop\file_list_full.txt
As an example, this will give:
Hello.exe
Help.txt
Big.png
sound.ogg
I need it to be:
Hello.exe Help.txt Big.png sound.ogg
How can I do this?