jpvhack
asked on
Listing a files/Directories , but i would want in one row
I'm trying listing a directory, but i would want output in one row. could any give me a hand?.
Actually:
dir c:\ /ad /b /-p /o:gen
file1
file2
file2
.
but i want this output: file1 file2 file3....
Thanks in advance
Actually:
dir c:\ /ad /b /-p /o:gen
file1
file2
file2
.
but i want this output: file1 file2 file3....
Thanks in advance
If you need to do this for once, do this:
1. dump the out to a text file by appending "> output.txt" to you dir command.
e.g. dir /b > output.txt
2. Open the file in MS word. Goto find and replace. Replace ^p with a blank/space.
If you need to do it repeatedly - thats another story.
1. dump the out to a text file by appending "> output.txt" to you dir command.
e.g. dir /b > output.txt
2. Open the file in MS word. Goto find and replace. Replace ^p with a blank/space.
If you need to do it repeatedly - thats another story.
ASKER
It should carry out in a file, in only batch file, or vb script file.
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
dir c:\ /ad /b /-p /o:gen > listing.txt
Then Reprocess the file with vba script or any other script to replace the CRLF line terminator with the file separator you need for example :" ,"
This can be automated very easyly