Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › batch file to add stuff to end of line?
New Posts  All Forums:Forum Nav:

batch file to add stuff to end of line?

post #1 of 3
Thread Starter 
Hey guys I have a text file, I was wondering anyone have a batch file to add a comma to the beninning and end of each line in a text file?

For example I have
Code:
1
2
3

and I want
Code:
"1",
"2",
"3",

If some could paste a quick one it would help me out =)
My System
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k @ 4.5Ghz Asus V-Pro Z68 GTX 780 ACX 8GB ddr3 G.Skill 
Hard DriveCoolingOSMonitor
512GB M4 SSD H60/620 combo Windows 7 Yamakasi 2560x1440p 27' 
PowerCase
Corsair HX750 HAF 912 
  hide details  
Reply
My System
(14 items)
 
  
CPUMotherboardGraphicsRAM
Intel i5 2500k @ 4.5Ghz Asus V-Pro Z68 GTX 780 ACX 8GB ddr3 G.Skill 
Hard DriveCoolingOSMonitor
512GB M4 SSD H60/620 combo Windows 7 Yamakasi 2560x1440p 27' 
PowerCase
Corsair HX750 HAF 912 
  hide details  
Reply
post #2 of 3
Call edlin in the batch file and echo the edlin commands to enter the characters where you want them .
My System
(15 items)
 
  
CPUMotherboardGraphicsRAM
FX6300 Black M5A99X EVO R2.0 Nvidia GTS450 Team Vulcan PC3 12800 
Hard DriveOptical DriveCoolingOS
Samsung 840 PRO Asus DRW-1608P (x2) Custom Water Cooling Win7 (Ult), Win 8.1 & Win Server 2012 R2 
MonitorKeyboardPowerCase
2 X Samsung 915N Ducky Shine III, Blue Cherry/Blue LEDs PCP&C 1kw Lian Li PC-71 (W/Window) 
MouseAudio
Logiteck G400s none 
  hide details  
Reply
My System
(15 items)
 
  
CPUMotherboardGraphicsRAM
FX6300 Black M5A99X EVO R2.0 Nvidia GTS450 Team Vulcan PC3 12800 
Hard DriveOptical DriveCoolingOS
Samsung 840 PRO Asus DRW-1608P (x2) Custom Water Cooling Win7 (Ult), Win 8.1 & Win Server 2012 R2 
MonitorKeyboardPowerCase
2 X Samsung 915N Ducky Shine III, Blue Cherry/Blue LEDs PCP&C 1kw Lian Li PC-71 (W/Window) 
MouseAudio
Logiteck G400s none 
  hide details  
Reply
post #3 of 3
might be easier just doing a regex find and replace in your text editor:

find \n
replace ",\n"
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › batch file to add stuff to end of line?