shoonya
shoonya

Reputation: 301

Windows Scripting - Editing Text File

C:\Incoming\records.txt

11 record(s) received

5021462426325

5021462426325

5021462426325

5021462426325

5021462426325

8901090213511

8901090213511

8901090213511

8901090213511

0080432400708

0080432400708

The desired format of the file contents

5021462426325,5021462426325,5021462426325,5021462426325,5021462426325,8901090213511,8901090213511,8901090213511,8901090213511,0080432400708,0080432400708

Then copy this from C:\Incoming to C:\Outgoing and place the old file in C:\Stored.

Upvotes: 0

Views: 248

Answers (1)

Bali C
Bali C

Reputation: 31251

for /f "tokens=* skip=1" %%i in (C:\Incoming\records.txt) do echo|set /p="%%i,">>C:\Outgoing\records.txt
move C:\Incoming\records.txt C:\Stored\records.txt

Upvotes: 1

Related Questions