Link to home
Start Free TrialLog in
Avatar of lm1189
lm1189

asked on

Multiline File to CSV

Experts,

I have a large number of multiline files, that look like the below example.  Could these files be reformatted as a CSV automatically?  Could you do a replace in Powershell to remove the new line breaks and replace them with Commas?

BEGMF;
MFVERSION 2;
MFDESC;
 BeginImportJob
  AutoApproved = True
  Class = Document
  DeleteProcessedFiles = True
  RequireReview = False
 BeginObject
  FileName = \\server\temp$\Tiffs\823609E02.tif
   BeginAttributes
    Document_Number = 823609
    Document_Name = 823609E02.tif
    Document_Revision = L
    Document_Type = Tiff
    Document_Description = DOCUMENT DESCRIPTION
    SheetNum = 02
    ReleaseDate = 05/08/2009
    DrawnBy = FIUKSP    
   EndAttributes
  EndObject
  EndImportJob
  ENDMF;

Open in new window

Avatar of SubSun
SubSun
Flag of India image

Can you give a sample output which you are expecting?
Avatar of lm1189
lm1189

ASKER

A CSV, with all the lines as columns. IE:

BEGMF;,MFVERSION 2;,MFDESC;, BeginImportJob,  AutoApproved = True,Class = Document  ,DeleteProcessedFiles = True

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial