I have tried a silly way to solve your problem. First I am assuming that all the rows have three columns. Insert the scripts in a table and use below query to have them all formatted as you desire. ( I have created a table named scripts and inserted the scripts in script column)
with cte as (
select *,charindex (',',script) FirstSplit,
charindex (',',script,charindex (',',script)+1) SecondSplit,
charindex ('),',script,charindex (',',script,charindex (',',script)+1)+1) ThirdSplit
from scripts
),
cte2 as (select * ,max(firstsplit)over(order by (select null)) MaxFirstSplit,max(SecondSplit)over(order by (select null)) MaxSecondSplit ,max(ThirdSplit)over(order by (select null))MaxThirdSplit from cte)
select (substring(script,1,firstsplit-1)+space(maxfirstsplit-firstsplit)+',') +
(substring(script,FirstSplit+1,SecondSplit-FirstSplit-1)+space(MaxSecondSplit-SecondSplit-(MaxFirstSplit-FirstSplit))+',' )+
(substring(script,SecondSplit+1,ThirdSplit-SecondSplit-1)+space(MaxThirdSplit-ThirdSplit-(MaxSecondSplit-SecondSplit))+'),') NewScript
from cte2
Input:
script
(123, 'File_X', 'ShortString'),
(124, 'File_XYZ', 'LoooonnnngString'),
(124, 'File_XYZ', 'LgString'),
(124, 'F_XYZ', 'Lgring'),
(1, 'F_XYZ', 'Lgring'),
Output:
NewScript
(123, 'File_X' , 'ShortString' ),
(124, 'File_XYZ', 'LoooonnnngString'),
(124, 'File_XYZ', 'LgString' ),
(124, 'F_XYZ' , 'Lgring' ),
(1 , 'F_XYZ' , 'Lgring' ),