windows - How can I output a batch file to one line? -


i'm new scripting need this. i've searched 2 days , cannot grasp this!

what i'm doing scanning directory particular files , counting results , piping file.

dir *.done | find "04338" /c >>04338.txt 

so results this:

 14   14   (blank line carriage return) 

my application trying read file , run commands against using regex. part works fine except application not assign variables using multi-line match properly... grab data fine cannot output properly.

because of have write of data 1 line. want this:

14,14,14,14,14,14,14 

i cannot life of me figure out how onto 1 line. please help!

try this:

@echo off /f "delims=" %%a in ('dir /b /a-d *.done ^| find "04338" /c') <nul set/p "=%%a,">>4338.txt type 4338.txt 

remove 1 , @ end of line.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -